/* ============================================================
   MOBILE OPTIMIZATIONS (Max-width: 900px)
   Overrides for robust tablet and smartphone display
   ============================================================ */

@media (max-width: 900px) {
  /* ── Global Spacing ── */
  .section { padding: 70px 0; }
  .container { padding: 0 20px; }

  /* ── Section Headers ── */
  .section-tag { font-size: 0.75rem; margin-bottom: 8px; }
  .section-title { font-size: 2.2rem; }
  .section-line { width: 60px; margin: 20px auto 40px; }

  /* ── Navbar ── */
  .nav-container { padding: 0 20px; height: 70px; }
  .nav-logo { font-size: 1.5rem; }
  
  /* ── Hero Section ── */
  .hero-name {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 15px;
  }
  .hero-title {
    font-size: 1.3rem;
    flex-direction: column;
    gap: 8px;
  }
  .hero-sep { display: none; } /* Hide | separator on mobile */
  
  .terminal-line {
    font-size: 0.85rem;
    padding: 8px 16px;
    margin-bottom: 24px;
  }
  
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin: 30px auto 0;
    gap: 16px;
  }
  .hero-cta-group .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* ── About Section ── */
  .about-card { padding: 24px; }
  .about-lead { font-size: 1.1rem; }
  
  .code-window {
    font-size: 0.8rem;
    overflow-x: auto;
  }
  .code-window pre {
    white-space: pre-wrap;
    word-break: break-all;
  }

  /* ── Experience Timeline ── */
  .timeline { padding-left: 20px; }
  .timeline-line { left: 0; }
  .timeline-marker { left: -42px; }
  .timeline-content { padding: 24px 20px; }
  .timeline-role { font-size: 1.2rem; }
  .timeline-company { font-size: 1rem; }
  .timeline-highlights {
    font-size: 0.9rem;
    padding-left: 16px;
  }

  /* ── Projects ── */
  .project-card { padding: 24px; }
  .project-title { font-size: 1.2rem; }
  .project-desc { font-size: 0.9rem; }

  /* ── Certifications ── */
  .cert-badge {
    padding: 16px;
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  .cert-icon {
    margin-right: 0;
    margin-bottom: 8px;
  }

  /* ── Contact ── */
  .contact-info {
    text-align: center;
    padding: 24px;
    align-items: center;
  }
  .contact-email {
    justify-content: center;
    font-size: 1.1rem;
    width: 100%;
  }
  .btn-download { width: 100%; justify-content: center; }
  .contact-form { padding: 24px; }
  
  /* Minor UI fixes */
  .scroll-progress { height: 2px; }
}

@media (max-width: 480px) {
  /* ── Ultra small screens (Phones) ── */
  .hero-name { font-size: 2.8rem; }
  .hero-title { font-size: 1.1rem; }
  .terminal-line { font-size: 0.75rem; }
  
  /* Make sidebar cover entire screen on very small devices */
  .nav-links {
    width: 100%;
    right: -100%;
  }
  
  .about-stats {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .stat-number { font-size: 2.2rem; }
  .stat-label { font-size: 0.7rem; }
}
