/* Tablet (768px and below) */
@media (max-width: 768px) {
  .container {
    padding: 20px;
  }

  h1 {
    font-size: 1.9em;
  }

  h2 {
    font-size: 1.3em;
  }

  body {
    font-size: 14px;
  }

  .btn {
    padding: 10px 18px;
  }

  .export-section {
    padding: 12px 0;
  }

  /* Tab navigation on tablet */
  .tab-navigation {
    justify-content: flex-start;
    margin-bottom: 1rem;
  }

  .tab {
    flex: 1 1 auto;
    min-width: 130px;
    max-width: 200px;
    font-size: 14px;
    padding: 9px 16px;
  }
}

/* Mobile (767px and below) - Tab specific styles */
@media (max-width: 767px) {
  .tab-navigation {
    justify-content: flex-start;
    margin-bottom: 1rem;
  }

  .tab {
    min-height: 40px;
    padding: 9px 14px;
    white-space: nowrap;
  }

  /* GitHub stats grid on mobile */
  .github-stats-grid {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .stat-card {
    padding: 0.7rem;
  }

  .github-intro {
    margin-bottom: 0.8rem;
  }

  /* Stack GitHub events vertically on mobile */
  .github-event {
    flex-direction: column;
    align-items: stretch;
  }

  .event-icon {
    margin: 0 0 0.5rem 0;
  }

  .event-link {
    margin-top: 0.5rem;
    align-self: flex-end;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  body {
    padding: 10px;
    font-size: 14px;
  }

  .container {
    padding: 15px;
    border-radius: 4px;
  }

  /* Export button on mobile */
  .export-pdf-btn {
    position: static;
    width: 100%;
    margin-bottom: 1rem;
    font-size: 0.95em;
  }

  #resume-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  #resume-header h1 {
    font-size: 1.5em;
  }

  #resume-header h2 {
    font-size: 1.1em;
  }

  h1 {
    font-size: 1.5em;
    margin-bottom: 0.25em;
  }

  h2 {
    font-size: 1.2em;
    padding-left: 0.5em;
  }

  h3 {
    font-size: 1em;
  }

  .resume ul {
    padding-left: 1.5em;
  }

  .resume li {
    margin: 0.25em 0;
  }

  .btn {
    width: 100%;
    padding: 12px 14px;
  }

  .form-group input,
  .form-group textarea {
    padding: 12px;
  }

  .export-section {
    padding: 12px 0;
  }

  .contact-section {
    margin-top: 30px;
    padding-top: 25px;
  }

  .contact-method {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .contact-method strong {
    min-width: auto;
  }

  .form-group label {
    font-size: 0.95em;
  }
}

/* Very small phones (360px and below) */
@media (max-width: 360px) {
  body {
    font-size: 13px;
  }

  h1 {
    font-size: 1.3em;
    padding-bottom: 0.3em;
  }

  .container {
    padding: 10px;
  }

  .resume ul {
    padding-left: 1.25em;
  }

  .btn {
    font-size: 0.95em;
    padding: 12px 14px;
  }
}

/* Accessibility: Ensure text is readable */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print Styles */
@media print {
  body {
    background-color: white;
    padding: 0;
  }

  .container {
    max-width: 100%;
    box-shadow: none;
    padding: 0;
    margin: 0;
    background: white;
  }

  .export-section,
  .contact-section {
    display: none;
  }

  a {
    border: none;
    text-decoration: underline;
  }
}
