/* ==========================================================================
   RESPONSIVE DESIGN SYSTEM
   ========================================================================== */

/* Large Desktop (1400px and up) */
@media screen and (min-width: 1400px) {
  .container {
    max-width: 1400px;
    margin: 0 auto;
  }

  .project-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* Desktop (1200px - 1399px) */
@media screen and (max-width: 1399px) and (min-width: 1200px) {
  .container {
    max-width: 1200px;
    margin: 0 auto;
  }

  .project-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  #profile {
    min-height: 80vh;
  }

  .about-containers {
    flex-wrap: wrap;
    gap: 1.5rem;
  }
}

/* Tablet Landscape (992px - 1199px) */
@media screen and (max-width: 1199px) and (min-width: 992px) {
  .container {
    max-width: 992px;
    margin: 0 auto;
  }

  .project-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  #hamburger-nav .logo {
    font-size: 1.4rem;
  }
}

/* Tablet Portrait (768px - 991px) */
@media screen and (max-width: 991px) and (min-width: 768px) {
  .container {
    max-width: 768px;
    margin: 0 auto;
  }

  .project-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  section {
    margin: 0 2rem;
    padding: 2rem 0;
  }

  .modal-content {
    max-width: 90%;
    margin: 1rem;
  }

  #hamburger-nav .logo {
    font-size: 1.3rem;
  }

  #hamburger-nav .nav-links {
    gap: 0.75rem;
  }
}

/* Mobile Landscape (576px - 767px) */
@media screen and (max-width: 767px) and (min-width: 576px) {
  .container {
    max-width: 576px;
    margin: 0 auto;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Filter Buttons - Smaller on Mobile */
  .project-filters {
    margin: 1.5rem 0 1rem 0;
    padding: 0 0.75rem;
  }

  .filter-btn {
    font-size: 0.825rem;
    padding: 0.45rem 1rem;
  }

  .project-count {
    font-size: 0.875rem;
  }

  section {
    margin: 0 1rem;
    padding: 1.5rem 0;
    min-height: fit-content;
  }
  
  .project-card {
    max-width: 100%;
    padding: 1rem;
  }
  
  .modal-content {
    max-width: 95%;
    padding: 1.5rem;
  }
  
  .contact-info-upper-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .experience-details-container {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
  }

  .details-container {
    margin-bottom: 1.5rem;
  }

  #hamburger-nav .nav-links a {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
}

/* Mobile Portrait (up to 575px) */
@media screen and (max-width: 575px) {
  .container {
    max-width: 100%;
    margin: 0 1rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Filter Buttons - Horizontal Scroll on Mobile */
  .project-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 1.5rem 0 1rem 0;
    padding: 0 0.5rem;
  }

  .project-filters::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex-shrink: 0;
    font-size: 0.8rem;
    padding: 0.4rem 0.9rem;
  }

  .project-count {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
  }

  .no-results {
    padding: 3rem 1rem;
  }

  .no-results h3 {
    font-size: 1.1rem;
  }

  .no-results p {
    font-size: 0.9rem;
  }

  section {
    margin: 0 0.5rem;
    padding: 1rem 0;
  }
  
  .project-card {
    max-width: 100%;
    padding: 0.75rem;
  }
  
  .project-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .project-btn {
    width: 100%;
    padding: 0.75rem;
  }
  
  .modal-content {
    max-width: 98%;
    padding: 1rem;
    margin: 0.5rem;
  }
  
  .modal-title {
    font-size: 1.25rem;
  }
  
  .contact-info-upper-container {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    margin: 1rem auto;
  }

  .contact-info-container {
    flex-direction: row;
    text-align: center;
    gap: 0.5rem;
    justify-content: center;
    max-width: 100%;
  }

  .contact-info-container p {
    font-size: 0.85rem !important;
    word-break: break-word;
    hyphens: auto;
  }

  .email-icon {
    height: 1.75rem !important;
  }
  
  .about-containers {
    flex-direction: row !important;
    gap: 0.75rem !important;
    flex-wrap: wrap !important;
  }
  
  .details-container {
    padding: 1rem !important;
    min-height: 110px !important;
    border-radius: 1.75rem !important;
  }
  
  .details-container h3 {
    font-size: 0.8rem !important;
  }
  
  .details-container p {
    font-size: 0.75rem !important;
  }
  
  .text-container {
    margin-top: 1.5rem !important;
    padding: 0 0.5rem !important;
  }
  
  .text-container p {
    font-size: 0.9rem !important;
  }
  
  .logo {
    font-size: 1.25rem;
  }
  
  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  
  .btn-container {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .btn {
    width: 100%;
    max-width: 200px;
  }
  
  article {
    font-size: 0.9rem;
    width: 100%;
    max-width: none;
    justify-content: flex-start;
    padding: 0.5rem;
    margin-bottom: 0.25rem;
  }
  
  .text-container {
    text-align: justify;
  }
  
  .details-container {
    margin-bottom: 1rem;
    padding: 1rem;
    min-height: fit-content;
  }
  
  .about-containers {
    margin-bottom: 1rem;
  }
  
  .experience-details-container {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
  }

  .article-container {
    gap: 1rem;
  }

  #hamburger-nav .nav-links a {
    padding: 0.65rem 0.875rem;
    font-size: 0.95rem;
  }

  footer {
    height: auto;
    min-height: 15vh;
    padding: 2rem 1rem;
    margin: 0 0.5rem;
  }

  footer p {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  footer nav {
    margin-bottom: 1rem;
  }
}

/* Extra Small Mobile (up to 320px) */
@media screen and (max-width: 320px) {
  .about-containers {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }
  
  .details-container {
    padding: 0.5rem !important;
    min-height: 90px !important;
    border-radius: 1.5rem !important;
  }
  
  .details-container h3 {
    font-size: 0.7rem !important;
    margin-bottom: 0.2rem !important;
  }
  
  .details-container p {
    font-size: 0.65rem !important;
  }
  
  .details-container .icon {
    height: 0.9rem !important;
    width: 0.9rem !important;
    margin-bottom: 0.2rem !important;
  }
}

/* Extra Small Mobile (up to 375px) */
@media screen and (max-width: 375px) {
  .container {
    margin: 0 0.25rem;
  }

  section {
    margin: 0;
    padding: 0.75rem 0;
  }

  .project-card {
    padding: 0.5rem;
  }

  .modal-content {
    padding: 0.75rem;
  }

  .logo {
    font-size: 1.1rem;
  }

  .section__pic-container {
    height: 180px !important;
    width: 180px !important;
  }

  .about-containers {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .details-container {
    padding: 0.75rem !important;
    min-height: 100px !important;
    border-radius: 1.5rem !important;
  }

  .details-container h3 {
    font-size: 0.75rem !important;
    margin-bottom: 0.25rem !important;
  }

  .details-container p {
    font-size: 0.7rem !important;
  }

  .details-container .icon {
    height: 1rem !important;
    width: 1rem !important;
    margin-bottom: 0.25rem !important;
  }

  .text-container {
    margin-top: 1rem !important;
    padding: 0 0.25rem !important;
  }

  .text-container p {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
  }

  .contact-info-container p {
    font-size: 0.8rem !important;
  }

  .email-icon {
    height: 1.5rem !important;
  }
}

/* High DPI Displays */
@media screen and (-webkit-min-device-pixel-ratio: 2), 
       screen and (min-resolution: 192dpi) {
  .icon {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
  
  .about-pic {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Print Styles */
@media print {
  .hamburger-nav,
  .modal,
  .arrow,
  .btn {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  .section__pic-container {
    width: 200px;
    height: 200px;
  }
}
