/* Enhanced Responsive Design for Modern Portfolio */

@media screen and (max-width: 1400px) {
  #profile {
    height: auto;
    min-height: 90vh;
    margin-bottom: 3rem;
    padding: 2rem 0;
  }
  
  .about-containers {
    flex-wrap: wrap;
  }
  
  #contact, #projects {
    height: fit-content;
  }
  
  .title {
    font-size: 2.5rem;
  }
  
  section {
    margin: 0 3%;
  }
}

@media screen and (max-width: 1200px) {
  #desktop-nav {
    display: none;
  }
  
  #hamburger-nav {
    display: flex;
  }
  
  #experience, .experience-details-container {
    margin-top: 2rem;
  }
  
  #profile, .section-container {
    display: block;
    text-align: center;
  }
  
  .arrow {
    display: none;
  }
  
  section {
    margin: 0 5%;
    padding: 3rem 0;
  }
  
  .section__pic-container {
    width: 350px;
    height: 350px;
    margin: 0 auto 2rem;
  }
  
  .about-containers {
    margin-top: 0;
    flex-direction: column;
    align-items: center;
  }
  
  .details-container {
    max-width: 600px;
    min-width: 300px;
    width: 100%;
  }
  
  .article-container1 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .title {
    font-size: 2.2rem;
  }
  
  .btn-container {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 200px;
  }
}

@media screen and (max-width: 768px) {
  section {
    margin: 0 3%;
    padding: 2rem 0;
  }
  
  .title {
    font-size: 1.8rem;
  }
  
  .section__text__p2, .section__text__p3 {
    font-size: 1.2rem;
  }
  
  .section__pic-container {
    width: 280px;
    height: 280px;
  }
  
  .nav-links-container {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .text-container, .text-container2 {
    padding: 1.5rem;
    margin: 1rem 0;
  }
  
  .experience-sub-title {
    font-size: 1.3rem;
  }
  
  .article-container1, .article-container2 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .contact-info-upper-container {
    flex-direction: column;
    align-items: center;
  }
  
  .contact-info-container {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
  
  .about-containers {
    gap: 1rem;
  }
  
  .color-container {
    margin: 0.5rem;
    max-width: 100%;
  }
  
  .project-title {
    font-size: 1.1rem;
    padding: 1rem;
  }
  
  .motto {
    margin: 1rem 0;
    padding: 1rem;
  }
  
  .motto p {
    font-size: 1rem;
  }
}

@media screen and (max-width: 600px) {
  section {
    margin: 0 2%;
    padding: 1.5rem 0;
  }
  
  nav {
    padding: 0 3%;
  }
  
  .hamburger-menu {
    position: relative;
  }
  
  .menu-links {
    width: 250px;
  }
  
  .title {
    font-size: 1.5rem;
  }
  
  .section__text__p1 {
    font-size: 1rem;
  }
  
  .section__text__p2, .section__text__p3 {
    font-size: 1.1rem;
  }
  
  .section__pic-container {
    width: 200px;
    height: 200px;
  }
  
  .btn {
    width: 180px;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .icon {
    height: 2rem;
    width: 2rem;
  }
  
  .details-container {
    padding: 1.5rem;
    min-height: auto;
    min-width: 280px;
  }
  
  .text-container, .text-container2 {
    padding: 1rem;
    font-size: 1rem;
  }
  
  .experience-sub-title {
    font-size: 1.2rem;
  }
  
  .project-title {
    font-size: 1rem;
    min-height: 60px;
  }
  
  .project-btn {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }
  
  footer {
    padding: 1.5rem 0;
  }
  
  footer .nav-links a {
    margin: 0 0.5rem;
    font-size: 0.9rem;
  }
}

@media screen and (max-width: 480px) {
  .section__pic-container {
    width: 180px;
    height: 180px;
  }
  
  .title {
    font-size: 1.3rem;
  }
  
  .btn-container {
    gap: 0.5rem;
  }
  
  .btn {
    width: 160px;
    padding: 0.7rem 1rem;
  }
  
  #socials-container {
    gap: 1rem;
  }
  
  .details-container {
    padding: 1rem;
  }
  
  .about-containers {
    gap: 0.5rem;
  }
  
  .menu-links {
    width: 200px;
    right: -20px;
  }
  
  .contact-info-container {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  
  .text-container2 li {
    padding: 0.8rem;
    margin: 0.8rem 0;
  }
}

/* Print Styles */
@media print {
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }
  
  nav, #hamburger-nav, .arrow, .btn, .floating {
    display: none !important;
  }
  
  section {
    page-break-inside: avoid;
    margin: 0;
    padding: 1rem 0;
  }
  
  .title {
    color: black !important;
    background: none !important;
    -webkit-text-fill-color: black !important;
  }
  
  .section__pic-container {
    width: 200px;
    height: 200px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #000051;
    --text-secondary: #000000;
    --border-light: #000000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .floating {
    animation: none;
  }
  
  html {
    scroll-behavior: auto;
  }
}
