/* ================================================================
   Victor Olmedo — Dev & Trainer Portfolio
   styles.css — Paleta logo: #F2F2F2 #1570BF #049DD9 #52BF41 #A2D92B
================================================================ */

:root {
    --yellow: #049DD9;
    --yellow-dark: #1570BF;
    --yellow-light: #A2D92B;
    --yellow-pale: #F2F2F2;
    --accent-green: #52BF41;
    --accent-lime: #A2D92B;
    --black: #0d1117;
    --dark: #0d1117;
    --dark2: #161b22;
    --gray: #3a3a4a;
    --gray2: #6e7681;
    --white: #F2F2F2;
    --red: #F44336;
    --blue: #1570BF;
    --rust: #049DD9;
    --rust-light: #A2D92B;
    --php-purple: #1570BF;
    --linux-orange: #52BF41;
    --pixel: 'Press Start 2P', monospace;
    --mono: 'DM Mono', monospace;
    --sans: 'DM Sans', sans-serif;
  }

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  html { scroll-behavior: smooth; }

  body {
    background: var(--dark);
    color: var(--white);
    font-family: var(--sans);
    overflow-x: hidden;
    cursor: default;
  }

  /* ── SCANLINES overlay ── */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.04) 2px,
      rgba(0,0,0,0.04) 4px
    );
    pointer-events: none;
    z-index: 9999;
  }

  /* ── CUSTOM CURSOR (pokeball) ── */
  body { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Ccircle cx='10' cy='10' r='9' fill='%23fff' stroke='%23222' stroke-width='1.5'/%3E%3Crect x='1' y='9' width='18' height='2' fill='%23222'/%3E%3Ccircle cx='10' cy='10' r='3' fill='%23fff' stroke='%23222' stroke-width='1.5'/%3E%3Cpath d='M1 10 A9 9 0 0 1 19 10' fill='%23E53935'/%3E%3Crect x='1' y='9' width='18' height='2' fill='%23222'/%3E%3Ccircle cx='10' cy='10' r='3' fill='%23fff' stroke='%23222' stroke-width='1.5'/%3E%3C/svg%3E") 10 10, auto; }

  /* ── NAV ── */
  nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(26,26,26,0.92);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--yellow);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
  }

  .nav-logo {
    font-family: var(--pixel);
    font-size: 10px;
    color: var(--yellow);
    text-decoration: none;
    letter-spacing: 1px;
  }

  .nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
  }

  .nav-links a {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--gray2);
    text-decoration: none;
    transition: color 0.2s;
    letter-spacing: 0.5px;
  }

  .nav-links a:hover { color: var(--yellow); }

  /* ── HERO ── */
  #hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 80px 2rem 2rem;
    position: relative;
    overflow: hidden;
  }

  .hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(255,215,0,0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,215,0,0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
  }

  .hero-bg-circle {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,215,0,0.07) 0%, transparent 70%);
    right: -100px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
  }

  .hero-content {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 1;
  }

  .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,215,0,0.1);
    border: 1px solid rgba(255,215,0,0.3);
    border-radius: 100px;
    padding: 6px 14px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--yellow);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease both;
  }

  .badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--yellow);
    animation: pulse 2s infinite;
  }

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

  .hero-name {
    font-family: var(--pixel);
    font-size: clamp(18px, 3vw, 28px);
    color: var(--yellow);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    animation: fadeInUp 0.6s 0.1s ease both;
  }

  .hero-title {
    font-family: var(--sans);
    font-size: clamp(14px, 2vw, 18px);
    color: var(--gray2);
    font-weight: 300;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s 0.2s ease both;
  }

  .hero-desc {
    font-size: 15px;
    line-height: 1.8;
    color: #9e9e9e;
    margin-bottom: 2rem;
    max-width: 480px;
    animation: fadeInUp 0.6s 0.3s ease both;
  }

  .hero-ctas {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s 0.4s ease both;
  }

  .btn-primary {
    font-family: var(--pixel);
    font-size: 9px;
    background: var(--yellow);
    color: var(--black);
    border: none;
    padding: 14px 24px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.1s, box-shadow 0.1s;
    display: inline-block;
    image-rendering: pixelated;
    clip-path: polygon(4px 0%, calc(100% - 4px) 0%, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0% calc(100% - 4px), 0% 4px);
  }

  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--yellow-dark);
  }

  .btn-primary:active {
    transform: translateY(2px);
    box-shadow: none;
  }

  .btn-outline {
    font-family: var(--mono);
    font-size: 12px;
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 14px 24px;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
    display: inline-block;
    border-radius: 4px;
  }

  .btn-outline:hover {
    border-color: var(--yellow);
    color: var(--yellow);
  }

  /* ── TRAINER CARD ── */
  .trainer-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: 3px solid var(--yellow);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s 0.5s ease both;
    box-shadow: 0 0 40px rgba(255,215,0,0.15), inset 0 0 60px rgba(255,215,0,0.03);
  }

  .trainer-card::before {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 120px; height: 120px;
    border-radius: 50%;
    border: 20px solid rgba(255,215,0,0.08);
  }

  .trainer-card::after {
    content: '';
    position: absolute;
    bottom: -20px; left: -20px;
    width: 80px; height: 80px;
    border-radius: 50%;
    border: 15px solid rgba(255,215,0,0.05);
  }

  .card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
  }

  .trainer-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid var(--yellow);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--dark2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--pixel);
    font-size: 24px;
  }

  .trainer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .card-title-block { flex: 1; }

  .card-label {
    font-family: var(--pixel);
    font-size: 7px;
    color: var(--yellow);
    letter-spacing: 2px;
    opacity: 0.7;
    margin-bottom: 4px;
  }

  .card-name {
    font-family: var(--pixel);
    font-size: 13px;
    color: var(--white);
    margin-bottom: 6px;
    line-height: 1.6;
  }

  .team-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,214,0,0.15);
    border: 1px solid rgba(255,214,0,0.4);
    border-radius: 100px;
    padding: 3px 10px;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--yellow);
  }

  .team-lightning {
    font-size: 12px;
  }

  .card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
    margin-bottom: 1.5rem;
  }

  .stat-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 10px 12px;
  }

  .stat-label {
    font-family: var(--mono);
    font-size: 9px;
    color: var(--gray2);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 4px;
  }

  .stat-value {
    font-family: var(--pixel);
    font-size: 10px;
    color: var(--yellow);
    line-height: 1.4;
  }

  .stat-value.small {
    font-size: 8px;
  }

  .card-pokemon {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,215,0,0.06);
    border: 1px solid rgba(255,215,0,0.15);
    border-radius: 10px;
    padding: 12px;
    position: relative;
    z-index: 1;
  }

  .poke-sprite {
    font-size: 32px;
    filter: drop-shadow(0 0 8px rgba(255,215,0,0.4));
  }

  .poke-info { flex: 1; }

  .poke-name {
    font-family: var(--pixel);
    font-size: 9px;
    color: var(--white);
    margin-bottom: 3px;
  }

  .poke-type {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--rust-light);
  }

  .hp-bar {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 6px;
  }

  .hp-fill {
    height: 100%;
    width: 85%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 2px;
    animation: hpLoad 1.5s 1s ease both;
  }

  @keyframes hpLoad {
    from { width: 0; }
    to { width: 85%; }
  }

  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* ── SECTION WRAPPER ── */
  .section {
    padding: 6rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
  }

  .section-header {
    margin-bottom: 3rem;
  }

  .section-eyebrow {
    font-family: var(--pixel);
    font-size: 8px;
    color: var(--yellow);
    letter-spacing: 3px;
    opacity: 0.7;
    margin-bottom: 0.75rem;
  }

  .section-title {
    font-family: var(--pixel);
    font-size: clamp(14px, 2.5vw, 20px);
    color: var(--white);
    line-height: 1.6;
  }

  .section-line {
    width: 48px;
    height: 3px;
    background: var(--yellow);
    margin-top: 1rem;
  }

  /* ── ABOUT ── */
  #about { border-top: 1px solid rgba(255,255,255,0.06); }

  .about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
  }

  .about-text p {
    font-size: 15px;
    line-height: 1.9;
    color: #9e9e9e;
    margin-bottom: 1.25rem;
  }

  .about-text p span.highlight {
    color: var(--yellow);
    font-weight: 600;
  }

  .timeline {
    position: relative;
    padding-left: 24px;
  }

  .timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--yellow), transparent);
  }

  .timeline-item {
    position: relative;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.5s, transform 0.5s;
  }

  .timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
  }

  .timeline-dot {
    position: absolute;
    left: -28px;
    top: 6px;
    width: 10px;
    height: 10px;
    background: var(--yellow);
    border-radius: 50%;
    border: 2px solid var(--dark);
    box-shadow: 0 0 0 2px var(--yellow);
  }

  .timeline-year {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--yellow);
    margin-bottom: 4px;
  }

  .timeline-role {
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 4px;
  }

  .timeline-desc {
    font-size: 13px;
    color: var(--gray2);
    line-height: 1.6;
  }

  /* ── TECH STACK ── */
  #stack { border-top: 1px solid rgba(255,255,255,0.06); }

  .stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
  }

  .stack-item {
    background: var(--dark2);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: border-color 0.2s, transform 0.2s;
    cursor: default;
    position: relative;
    overflow: hidden;
  }

  .stack-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-color, var(--yellow));
    opacity: 0;
    transition: opacity 0.2s;
  }

  .stack-item:hover {
    border-color: var(--accent-color, var(--yellow));
    transform: translateY(-4px);
  }

  .stack-item:hover::before { opacity: 0.05; }

  .stack-icon {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
    position: relative;
    z-index: 1;
    transition: transform 0.3s;
  }

  .stack-item:hover .stack-icon {
    transform: scale(1.2) rotate(-5deg);
  }

  .stack-name {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--white);
    position: relative;
    z-index: 1;
  }

  .stack-level {
    font-family: var(--mono);
    font-size: 9px;
    color: var(--gray2);
    margin-top: 4px;
    position: relative;
    z-index: 1;
  }

  .stack-item.love { --accent-color: var(--rust-light); }
  .stack-item.php-item { --accent-color: var(--php-purple); }
  .stack-item.linux-item { --accent-color: var(--linux-orange); }
  .stack-item.js-item { --accent-color: #F7DF1E; }
  .stack-item.mysql-item { --accent-color: #00618A; }
  .stack-item.laravel-item { --accent-color: #FF2D20; }
  .stack-item.git-item { --accent-color: #F05032; }
  .stack-item.css-item { --accent-color: #264de4; }

  /* ── PROJECTS ── */
  #projects { border-top: 1px solid rgba(255,255,255,0.06); }

  .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
  }

  .project-card {
    background: var(--dark2);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
  }

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

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

  .project-thumb.todo { background: linear-gradient(135deg, #1a237e, #283593); }
  .project-thumb.agenda { background: linear-gradient(135deg, #1b5e20, #2e7d32); }
  .project-thumb.taqueria { background: linear-gradient(135deg, #bf360c, #d84315); }
  .project-thumb.licenses { background: linear-gradient(135deg, #4a148c, #6a1b9a); }

  .project-thumb .poke-deco {
    position: absolute;
    font-size: 48px;
    opacity: 0.15;
    right: -10px;
    bottom: -10px;
    transform: rotate(-15deg);
  }

  .project-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }

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

  .tag {
    font-family: var(--mono);
    font-size: 10px;
    background: rgba(255,215,0,0.1);
    color: var(--yellow);
    border: 1px solid rgba(255,215,0,0.2);
    border-radius: 100px;
    padding: 2px 8px;
  }

  .tag.red { background: rgba(244,67,54,0.1); color: #ef9a9a; border-color: rgba(244,67,54,0.2); }
  .tag.green { background: rgba(76,175,80,0.1); color: #a5d6a7; border-color: rgba(76,175,80,0.2); }
  .tag.purple { background: rgba(156,39,176,0.1); color: #ce93d8; border-color: rgba(156,39,176,0.2); }
  .tag.blue { background: rgba(33,150,243,0.1); color: #90caf9; border-color: rgba(33,150,243,0.2); }

  .project-name {
    font-family: var(--pixel);
    font-size: 11px;
    color: var(--white);
    margin-bottom: 0.5rem;
    line-height: 1.6;
  }

  .project-desc {
    font-size: 13px;
    color: var(--gray2);
    line-height: 1.7;
    flex: 1;
    margin-bottom: 1rem;
  }

  .project-link {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--yellow);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255,215,0,0.3);
    padding: 8px 14px;
    border-radius: 6px;
    transition: background 0.2s;
    width: fit-content;
  }

  .project-link:hover { background: rgba(255,215,0,0.1); }

  /* ── RANDOM DATA / POKÉDEX ── */
  #pokedex { border-top: 1px solid rgba(255,255,255,0.06); }

  .pokedex-container {
    background: linear-gradient(135deg, #b71c1c 0%, #c62828 40%, #e53935 100%);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,0.1);
  }

  .pokedex-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: rgba(0,0,0,0.1);
    border-radius: 20px 20px 0 0;
  }

  .pokedex-screen {
    background: #1a1a1a;
    border-radius: 12px;
    border: 4px solid #333;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.5);
  }

  .screen-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,215,0,0.2);
  }

  .screen-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--yellow);
    animation: blink 2s infinite;
  }

  @keyframes blink {
    0%, 90%, 100% { opacity: 1; }
    95% { opacity: 0.2; }
  }

  .screen-title {
    font-family: var(--pixel);
    font-size: 10px;
    color: var(--yellow);
  }

  .data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }

  .data-entry {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    padding: 1rem;
  }

  .data-key {
    font-family: var(--pixel);
    font-size: 7px;
    color: var(--yellow);
    opacity: 0.7;
    letter-spacing: 1px;
    margin-bottom: 6px;
  }

  .data-val {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--white);
    line-height: 1.5;
  }

  .data-val.big {
    font-family: var(--pixel);
    font-size: 11px;
    color: var(--yellow);
  }

  /* ── CONTACT ── */
  #contact { border-top: 1px solid rgba(255,255,255,0.06); }

  .contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
  }

  .contact-text p {
    font-size: 15px;
    line-height: 1.8;
    color: #9e9e9e;
    margin-bottom: 1.5rem;
  }

  .contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    text-decoration: none;
    font-family: var(--mono);
    font-size: 13px;
    padding: 12px 16px;
    background: var(--dark2);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    transition: border-color 0.2s, background 0.2s;
  }

  .contact-link:hover {
    border-color: var(--yellow);
    background: rgba(255,215,0,0.05);
    color: var(--yellow);
  }

  .contact-icon { font-size: 20px; }

  .contact-form-placeholder {
    background: var(--dark2);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 2rem;
  }

  .form-group { margin-bottom: 1.25rem; }

  .form-label {
    display: block;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--gray2);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
  }

  .form-input {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--white);
    font-family: var(--mono);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
  }

  .form-input:focus { border-color: var(--yellow); }

  .form-textarea {
    height: 100px;
    resize: none;
  }

  /* ── FOOTER ── */
  footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid rgba(255,255,255,0.06);
  }

  .footer-pixel {
    font-family: var(--pixel);
    font-size: 8px;
    color: var(--gray2);
    line-height: 2;
  }

  .footer-pixel span { color: var(--yellow); }

  /* ── SCROLL ANIMATION ── */
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* ── RESPONSIVE ── */
  @media (max-width: 768px) {
    .hero-content, .about-grid, .contact-wrapper { grid-template-columns: 1fr; gap: 2rem; }
    .trainer-card { order: -1; }
    nav { padding: 0 1rem; }
    .nav-links { display: none; }
    .section { padding: 4rem 1rem; }
  }

  /* ── PIXEL BORDER UTILITY ── */
  .pixel-border {
    box-shadow:
      -4px 0 0 0 var(--yellow),
      4px 0 0 0 var(--yellow),
      0 -4px 0 0 var(--yellow),
      0 4px 0 0 var(--yellow);
  }

  /* ── SCROLLBAR ── */
  ::-webkit-scrollbar { width: 6px; }
  ::-webkit-scrollbar-track { background: var(--dark); }
  ::-webkit-scrollbar-thumb { background: var(--yellow-dark); border-radius: 3px; }



/* ── TABS ── */
.rd-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.rd-tab {
  font-family: var(--mono);
  font-size: 12px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--gray2);
  padding: 8px 16px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
}
.rd-tab:hover { border-color: var(--yellow); color: var(--white); }
.rd-tab.active { background: var(--yellow); color: var(--black); border-color: var(--yellow); font-weight: 600; }
.rd-panel { display: none; animation: panelIn 0.35s ease; }
.rd-panel.active { display: block; }
@keyframes panelIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

/* ── BOOKS NUEVA VERSIÓN ── */
.bookshelf-scene {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.bk { width: 100%; }

/* Estado cerrado — libro vertical compacto */
.bk-closed {
  display: flex;
  height: 160px;
  width: 120px;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
  border-radius: 0 6px 6px 0;
  box-shadow: 4px 4px 16px rgba(0,0,0,0.5);
}
.bk-closed:hover { transform: translateX(8px) rotate(-1deg); box-shadow: 8px 8px 24px rgba(0,0,0,0.6); }
.bk-spine {
  width: 22px;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px 0 0 3px;
  flex-shrink: 0;
}
.bk-spine span {
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 8px;
  color: rgba(255,255,255,0.8);
  letter-spacing: 2px;
  transform: rotate(180deg);
}
.bk-front {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border-radius: 0 6px 6px 0;
  gap: 4px;
}
.bk-front-emoji { font-size: 28px; }
.bk-front-title { font-family: var(--pixel); font-size: 6px; color: rgba(255,255,255,0.95); text-align: center; line-height: 1.6; }
.bk-front-author { font-family: var(--mono); font-size: 8px; color: rgba(255,255,255,0.5); text-align: center; }
.bk-click-hint { font-family: var(--mono); font-size: 7px; color: rgba(255,255,255,0.3); margin-top: 4px; }

/* Libro abierto — se expande como páginas */
.bk-open-content {
  display: none;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  margin-top: 0;
  animation: bookOpen 0.4s cubic-bezier(0.22,1,0.36,1);
}
@keyframes bookOpen {
  from { opacity: 0; transform: scaleY(0.7) translateY(-20px); }
  to   { opacity: 1; transform: scaleY(1) translateY(0); }
}
.bk.open .bk-closed { display: none; }
.bk.open .bk-open-content { display: flex; }

/* Páginas del libro */
.bk-left-page {
  flex: 1;
  background: #f5f0e8;
  padding: 1.5rem;
  border-right: 3px solid #d4c8a8;
  min-height: 220px;
  position: relative;
}
.bk-page-deco { font-size: 40px; margin-bottom: 12px; }
.bk-page-lines { display: flex; flex-direction: column; gap: 8px; }
.bk-line { height: 2px; background: #c8b89a; border-radius: 1px; }
.bk-line.full { width: 100%; }
.bk-line.long { width: 85%; }
.bk-line.med  { width: 65%; }
.bk-line.short{ width: 40%; }

.bk-right-page {
  flex: 1.4;
  background: var(--dark2);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bk-page-title { font-family: var(--pixel); font-size: 11px; color: var(--yellow); line-height: 1.6; }
.bk-page-author { font-family: var(--mono); font-size: 11px; color: var(--gray2); }
.bk-page-tag { font-family: var(--mono); font-size: 10px; color: var(--white); background: rgba(4,157,217,0.1); border: 1px solid rgba(4,157,217,0.25); padding: 3px 10px; border-radius: 100px; display: inline-block; width: fit-content; }
.bk-page-note { font-size: 13px; line-height: 1.75; color: #9e9e9e; flex: 1; }
.bk-page-stars { font-family: var(--pixel); font-size: 9px; color: var(--yellow); }
.bk-close-btn {
  font-family: var(--mono);
  font-size: 11px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--gray2);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 4px;
  width: fit-content;
  transition: color 0.2s, border-color 0.2s;
}
.bk-close-btn:hover { color: var(--yellow); border-color: var(--yellow); }
.bk-fav .bk-closed { filter: drop-shadow(0 0 12px rgba(4,157,217,0.4)); }

@media (max-width: 600px) {
  .bk-open-content { flex-direction: column; }
  .bk-left-page { min-height: 100px; border-right: none; border-bottom: 3px solid #d4c8a8; }
}

/* Book modal — queda vacío pero lo dejamos por si acaso */
.book-modal-overlay { display: none; }


/* ── MUSIC ── */
.music-player { background: var(--dark2); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; overflow: hidden; }
.music-header { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; background: rgba(255,215,0,0.05); border-bottom: 1px solid rgba(255,255,255,0.06); }
.music-visualizer { display: flex; align-items: flex-end; gap: 3px; height: 32px; }
.music-visualizer span { display: block; width: 4px; background: var(--yellow); border-radius: 2px; animation: viz 0.8s ease-in-out infinite alternate; }
.music-visualizer span:nth-child(1){height:40%;animation-delay:0s}
.music-visualizer span:nth-child(2){height:70%;animation-delay:0.1s}
.music-visualizer span:nth-child(3){height:100%;animation-delay:0.2s}
.music-visualizer span:nth-child(4){height:60%;animation-delay:0.3s}
.music-visualizer span:nth-child(5){height:80%;animation-delay:0.15s}
.music-visualizer span:nth-child(6){height:50%;animation-delay:0.25s}
.music-visualizer span:nth-child(7){height:90%;animation-delay:0.05s}
.music-visualizer span:nth-child(8){height:40%;animation-delay:0.35s}
@keyframes viz { from { transform: scaleY(0.3); } to { transform: scaleY(1); } }
.music-now { font-family: var(--pixel); font-size: 8px; color: var(--yellow); margin-bottom: 4px; }
.music-sub { font-family: var(--mono); font-size: 12px; color: var(--gray2); }
.music-list { padding: 1rem; }
.music-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; cursor: pointer; transition: background 0.2s; margin-bottom: 6px; }
.music-item:hover, .music-item.playing { background: rgba(255,215,0,0.07); }
.music-item.playing { border: 1px solid rgba(255,215,0,0.2); }
.music-rank { font-family: var(--pixel); font-size: 8px; color: var(--gray2); width: 20px; }
.music-item.playing .music-rank { color: var(--yellow); }
.music-emoji { font-size: 20px; }
.music-info { flex: 1; }
.music-artist { font-family: var(--mono); font-size: 13px; color: var(--white); }
.music-genre { font-family: var(--mono); font-size: 10px; color: var(--gray2); }
.music-bar { width: 80px; height: 3px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.music-bar-fill { height: 100%; background: var(--yellow); border-radius: 2px; }
.music-desc-box { display: flex; gap: 12px; align-items: flex-start; padding: 1rem 1.5rem; border-top: 1px solid rgba(255,255,255,0.06); background: rgba(255,215,0,0.04); }
#musicDescEmoji { font-size: 28px; flex-shrink: 0; }
.music-desc-artist { font-family: var(--pixel); font-size: 9px; color: var(--yellow); margin-bottom: 4px; }
.music-desc-text { font-size: 13px; color: var(--gray2); line-height: 1.6; }

/* ── GAMES ── */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.game-card { background: var(--dark2); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 1.25rem; transition: transform 0.2s, border-color 0.2s; position: relative; }
.game-card:hover { transform: translateY(-4px); border-color: rgba(255,215,0,0.3); }
.game-card.featured { border-color: var(--yellow); background: rgba(255,215,0,0.04); }
.game-icon { font-size: 36px; margin-bottom: 8px; }
.game-name { font-family: var(--pixel); font-size: 9px; color: var(--white); margin-bottom: 4px; line-height: 1.6; }
.game-platform { font-family: var(--mono); font-size: 10px; color: var(--yellow); margin-bottom: 8px; }
.game-desc { font-size: 12px; color: var(--gray2); line-height: 1.6; }
.game-badge { position: absolute; top: 10px; right: 10px; font-family: var(--pixel); font-size: 6px; background: var(--yellow); color: var(--black); padding: 3px 6px; border-radius: 4px; }

/* ── FÚTBOL ── */
.futbol-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.team-card { background: var(--dark2); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 2rem; text-align: center; transition: transform 0.2s; }
.team-card:hover { transform: translateY(-4px); }
.team-card.america { border-color: rgba(255,215,0,0.4); background: rgba(255,215,0,0.04); }
.team-card.secondary-team { opacity: 0.75; }
.team-badge-big { font-size: 48px; margin-bottom: 1rem; }
.team-label { font-family: var(--pixel); font-size: 7px; color: var(--yellow); letter-spacing: 2px; margin-bottom: 8px; opacity: 0.7; }
.team-name { font-family: var(--pixel); font-size: 14px; color: var(--white); margin-bottom: 4px; line-height: 1.5; }
.team-sub { font-family: var(--mono); font-size: 11px; color: var(--gray2); margin-bottom: 12px; }
.team-desc { font-size: 13px; color: #9e9e9e; line-height: 1.7; margin-bottom: 1rem; }
.team-stars { display: flex; justify-content: center; gap: 4px; }
.star { font-size: 16px; color: rgba(255,255,255,0.15); }
.star.active { color: var(--yellow); }
@media (max-width: 600px) { .futbol-wrapper { grid-template-columns: 1fr; } }

/* ── MUNDO ── */
.mundo-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.mundo-card { background: var(--dark2); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 1.5rem; transition: transform 0.2s, border-color 0.2s; }
.mundo-card:hover { transform: translateY(-4px); border-color: rgba(255,215,0,0.3); }
.mundo-card.big { grid-column: span 3; background: rgba(255,215,0,0.04); border-color: rgba(255,215,0,0.2); }
.mundo-icon { font-size: 32px; margin-bottom: 10px; }
.mundo-label { font-family: var(--pixel); font-size: 7px; color: var(--yellow); opacity: 0.7; letter-spacing: 2px; margin-bottom: 6px; }
.mundo-title { font-family: var(--pixel); font-size: 11px; color: var(--white); margin-bottom: 8px; line-height: 1.6; }
.mundo-desc { font-size: 13px; color: var(--gray2); line-height: 1.7; }
@media (max-width: 600px) { .mundo-grid { grid-template-columns: 1fr; } .mundo-card.big { grid-column: span 1; } }

/* ================================================================
   POKÉMON NAV BAR
================================================================ */
.poke-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: #0d1117;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.poke-nav-inner {
  display: flex;
  align-items: stretch;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 72px;
  gap: 0;
}

.poke-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 18px;
  text-decoration: none;
  color: var(--gray2);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  position: relative;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  min-width: 80px;
}

.poke-nav-item:hover {
  background: rgba(255,255,255,0.04);
  color: var(--white);
  border-bottom-color: var(--yellow);
}

.poke-nav-item.active {
  color: var(--white);
  border-bottom-color: var(--yellow);
  background: rgba(4,157,217,0.06);
}

.poke-nav-home {
  background: rgba(4,157,217,0.08);
  border-bottom-color: var(--yellow) !important;
  color: var(--white) !important;
  min-width: 90px;
}

.poke-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.poke-nav-item span {
  line-height: 1;
  white-space: nowrap;
}

.poke-nav-divider {
  width: 1px;
  background: rgba(255,255,255,0.07);
  margin: 14px 0;
  flex-shrink: 0;
}

.poke-nav-colorbar {
  display: flex;
  height: 4px;
}

/* Ajustar hero padding por nav más alto */
#hero { padding-top: 96px; }

@media (max-width: 768px) {
  .poke-nav-inner { height: 56px; gap: 0; padding: 0 0.25rem; overflow-x: auto; scrollbar-width: none; }
  .poke-nav-inner::-webkit-scrollbar { display: none; }
  .poke-nav-item { padding: 0 10px; font-size: 9px; min-width: 58px; }
  .poke-nav-icon { width: 26px; height: 26px; }
  .poke-nav-icon svg { width: 20px; height: 20px; }
  .poke-nav-divider { display: none; }
  #hero { padding-top: 76px; }
}

/* ================================================================
   TUX RUNNER GAME
================================================================ */
.tux-section { display: none; }
.tux-section.visible { display: block !important; }

.tux-game-wrapper {
  background: var(--dark2);
  border: 2px solid rgba(82,191,65,0.3);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

#tuxCanvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  background: #0d1117;
}

.tux-ui {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: rgba(255,255,255,0.02);
  border-top: 1px solid rgba(255,255,255,0.06);
  justify-content: flex-end;
}

.tux-score-label, .tux-hi-label {
  font-family: var(--pixel);
  font-size: 8px;
  color: var(--gray2);
}

.tux-score, .tux-hi {
  font-family: var(--pixel);
  font-size: 12px;
  color: var(--yellow);
  min-width: 60px;
  text-align: right;
}

.tux-msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--pixel);
  font-size: 10px;
  color: var(--white);
  background: rgba(13,17,23,0.7);
  gap: 10px;
  letter-spacing: 1px;
}

/* Offline banner */
.offline-banner {
  display: none;
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark2);
  border: 2px solid var(--yellow);
  border-radius: 100px;
  padding: 10px 24px;
  font-family: var(--pixel);
  font-size: 9px;
  color: var(--yellow);
  z-index: 500;
  cursor: pointer;
  animation: bounceIn 0.4s ease;
  white-space: nowrap;
}

@keyframes bounceIn {
  from { opacity:0; transform: translateX(-50%) translateY(20px); }
  to   { opacity:1; transform: translateX(-50%) translateY(0); }
}
