/* 
   RESPONSIVE STYLES
   Keeping this file linked last on every page
    */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Image comes first, left text moves below */
  .hero-right {
    order: 1;
  }

  .hero-left {
    order: 2;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-meta {
    justify-content: center;
  }

  .hero-svg-box {
    max-width: 420px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 1px solid var(--line);
    display: none;
    gap: 1rem;
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    padding: 3rem 1.5rem 2rem;
  }

  .container {
    padding: 2rem 1.5rem;
  }

  .typing-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-box {
    border-right: none;
  }

  .stat-box:nth-child(2n+1) {
    border-right: 1px solid var(--line);
  }

  .typing-display {
    font-size: 1.1rem;
    line-height: 1.9;
  }

  .practice-target {
    font-size: 1.25rem;
    letter-spacing: 0.08em;
    padding: 1.25rem;
  }

  .keyboard {
    padding: 1rem;
  }

  .key {
    min-width: 28px;
    height: 36px;
    font-size: 0.65rem;
    padding: 0 0.3rem;
  }

  .key.wide {
    min-width: 44px;
  }

  .key.xwide {
    min-width: 54px;
  }

  .key.space {
    min-width: 140px;
  }
}

@media (max-width: 520px) {
  .hero {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-svg-box {
    max-width: 320px;
    min-height: auto;
  }

  .hero-left h1 {
    font-size: 2.4rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  .hero-meta {
    flex-direction: column;
    gap: 0.75rem;
  }
}
