/* Large desktops - Default styles (1200px and up) */
@media (min-width: 1200px) {
    body {
        padding-top: 0;
        padding-left: 17rem;
    }
    #sideNav {
        text-align: center;
        position: fixed;
        top: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        width: 17rem;
        height: 100vh;
    }
    #sideNav .navbar-brand {
        display: flex;
        margin: auto auto 0;
        padding: 0.5rem;
    }
    #sideNav .navbar-brand .img-profile {
        max-width: 10rem;
        max-height: 10rem;
        border: 0.5rem solid rgba(255, 255, 255, 0.2);
    }
    #sideNav .navbar-collapse {
        display: flex;
        align-items: flex-start;
        flex-grow: 0;
        width: 100%;
        margin-bottom: auto;
    }
    #sideNav .navbar-collapse .navbar-nav {
        flex-direction: column;
        width: 100%;
    }
    #sideNav .navbar-collapse .navbar-nav .nav-item {
        display: block;
    }
    #sideNav .navbar-collapse .navbar-nav .nav-item .nav-link {
        display: block;
    }
    section.resume-section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    #main-footer .footer {
        display: none;
    }
}

/* Medium desktops and tablets landscape (992px - 1199px) */
@media (min-width: 992px) and (max-width:1199.98px){
    body {
        padding-top: 0;
        padding-left: 17rem;
    }
    #sideNav {
        text-align: center;
        position: fixed;
        top: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        width: 17rem;
        height: 100vh;
    }
    #sideNav .navbar-brand {
        display: flex;
        margin: auto auto 0;
        padding: 0.5rem;
    }
    #sideNav .navbar-brand .img-profile {
        max-width: 10rem;
        max-height: 10rem;
        border: 0.5rem solid rgba(255, 255, 255, 0.2);
    }
    #sideNav .navbar-collapse {
        display: flex;
        align-items: flex-start;
        flex-grow: 0;
        width: 100%;
        margin-bottom: auto;
    }
    #sideNav .navbar-collapse .navbar-nav {
        flex-direction: column;
        width: 100%;
    }
    #sideNav .navbar-collapse .navbar-nav .nav-item {
        display: block;
    }
    #sideNav .navbar-collapse .navbar-nav .nav-item .nav-link {
        display: block;
    }
    section.resume-section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    #main-footer .footer {
        display: none;
    }.contact-form-wrapper {
        flex-direction: column;
        gap: 20px;
    }  
    .contact-form, .social-connect {
        flex: none;
        width: 100%;
    }  
    .form-row.compact-row {
        flex-direction: row;
        gap: 0;
    }  
    .form-group.half-width {
        width: 100%;
        padding-left: 5px;
        padding-right: 5px;
    }
    .gender-select {
        padding-left: 35px;
    }
    .social-icons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    } 
    .social-icon {
        flex: 1;
        min-width: 160px;
        flex-direction: column;
        text-align: center;
        padding: 15px 10px;
    }    
    .social-icon i {
        margin-right: 0;
        margin-bottom: 8px;
    }  
    .social-icon span {
        text-align: center;
        font-size: 1.1rem;
    }
    #skills .skill-col {
        padding: 0px 10px;
    }
    #skills .skill-col .skill-card-alt {
        align-items: center;
        justify-content: center;
    }
    #skills .skill-col .skill-title-alt {
        padding-left: 15px;
    }
    #skills .skill-card-alt ul {
        margin-left: -25px;
    }
    #projects .project-badge {
        position: relative;
        top: auto;
        right: auto;
        display: inline-block;
        margin-bottom: 0px;
    }
}

/* Tablets portrait (768px - 991px) */
@media (min-width: 768px) and (max-width:991.98px) {
    #sideNav {
        padding: 0.5rem 1rem;
    }
    #sideNav .navbar-toggler {
        margin-left: auto;
    }
    /*
    #sideNav .navbar-brand {
        font-size: 1.2rem;
        font-weight: bold;
    }
    */
    .navbar-brand {
        margin-right: auto;
    }  
    .mobile-logo-with-name {
        max-width: 200px;
    }
    #navbarSupportedContent.show .navbar-nav {
        position: relative;
        padding-top: 15px;
    }
    #navbarSupportedContent.show .navbar-nav::before {
        content: '';
        position: absolute;
        top: 5px;
        left: 0px;
        right: 0px;
        height: 2px;
        background: rgba(255, 255, 255, 0.25);
        border-radius: 1px;
    }
    #navbar-footer .footer {
        display: none;
    }
    .footer {
        background: linear-gradient(135deg, #042a4b, #0e3a53);
        color: #b7bcc2;
    }
    #about .list-social-icons {
        margin-left: -5px;
    }
    section.resume-section {
        min-height: 100vh;
    }
    section.resume-section .resume-item .resume-date {
        min-width: 18rem;
    }
    #experience .pdf-container img {
        width: 40%;
        height: auto;
        border: none;
    }
    #skills .skills-container {
        grid-template-columns: repeat(2, minmax(150px, 1fr)); 
        gap: 1rem;
    }
    #skills .skill-col .skill-icon-alt {
        margin-left: -10px;
    }
    #projects .category-filter {
        position: sticky;
        top: 80px;
        padding: 10px 0;
    }
    #projects .filter-btn {
        font-size: 0.9rem;
        margin: 1px;
    }
    #projects .project-badge {
        position: relative;
        top: auto;
        right: auto;
        display: inline-block;
        margin-bottom: 0px;
    }
    #publications .pdf-container img {
        width: 40%;
        height: auto;
        border: none;
    }
    #viewer .error-container img {
        max-width: 25%; 
        height: auto;
    }
}

/* Phones landscape (576px - 767px) */
@media (min-width:576px) and (max-width:767.98px){
    #sideNav {
        padding: 0.5rem 1rem;
    }
    #sideNav .navbar-toggler {
        margin-left: auto;
    }
    /*
    #sideNav .navbar-brand {
        font-size: 1.2rem;
        font-weight: bold;
    }
    */
    #navbarSupportedContent.show .navbar-nav {
        position: relative;
        padding-top: 15px;
    }
    #navbarSupportedContent.show .navbar-nav::before {
        content: '';
        position: absolute;
        top: 5px;
        left: 0px;
        right: 0px;
        height: 2px;
        background: rgba(255, 255, 255, 0.25);
        border-radius: 1px;
    }
    #navbar-footer .footer {
        display: none;
    }
    .footer {
        background: linear-gradient(135deg, #042a4b, #0e3a53);
        color: #b7bcc2;
    } 
    .contact-form-wrapper {
        flex-direction: column;
        gap: 20px;
    }  
    .contact-form, .social-connect {
        flex: none;
        width: 100%;
    }  
    .form-row.compact-row {
        flex-direction: column;
        gap: 0;
    }  
    .form-group.half-width {
        width: 100%;
    }
    .gender-select {
        padding-left: 35px; /* Slightly less padding on mobile */
    } 
    .social-icons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    } 
    .social-icon {
        flex: 1;
        min-width: 160px;
        flex-direction: column;
        text-align: center;
        padding: 15px 10px;
    }    
    .social-icon i {
        margin-right: 0;
        margin-bottom: 8px;
    }  
    .social-icon span {
        text-align: center;
        font-size: 1.1rem;
    }
    #education .float-left {
        margin-left: 10px;
        margin-bottom: 5px;
    }
    #education .resume-date {
        margin-left: 20px;
    }
    .button .filled {
        margin-bottom: 15px;
    }
    #skills .skills-container {
        grid-template-columns: repeat(2, minmax(150px, 1fr)); 
        gap: 1rem;
    }
    #skills .skill-col {
        margin-top: 10px;
    }
    #skills .skill-card-simple {
        margin-top: 10px;
    }
    #projects .project-img {
        margin-left: 0px;
    }
    #projects .project-info {
        padding-top: 15px;
        padding-left: 15px;
    }
    #projects .category-filter {
        position: sticky;
        top: 80px;
        padding: 10px 0;
    }
    #projects .filter-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
        margin: 3px;
    }
    #projects .category-header {
        flex-direction: column;
        text-align: center;
        padding-bottom: 15px;
    }   
    #projects .category-icon {
        margin-right: 0;
        margin-bottom: 10px;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        padding: 10px;
    }   
    #projects .category-line {
        left: 50%;
        transform: translateX(-50%);
        width: 80px;
    }   
    #projects .project-badge {
        position: relative;
        top: auto;
        right: auto;
        display: inline-block;
        margin-bottom: 0px;
    }
    #certification .float-left {
        margin-left: 20px;
        margin-bottom: 5px;
    }
    #certification .resume-date {
        margin-left: 20px;
    }
    .button .certificate {
        margin-top: 15px;
        margin-left: 20px;
    }
    .pdf-container {
        height: 80vh;
    }
}

/* Phones portrait (575px and down) */
@media (min-width:361px) and (max-width:575.98px) {
    #sideNav {
        padding: 0.5rem 1rem;
    }
    #sideNav .navbar-toggler {
        margin-left: auto;
    }
    /*
    #sideNav .navbar-brand {
        font-size: 1.2rem;
        font-weight: bold;
    }
    */
    #navbarSupportedContent.show .navbar-nav {
        position: relative;
        padding-top: 15px;
    }
    #navbarSupportedContent.show .navbar-nav::before {
        content: '';
        position: absolute;
        top: 5px;
        left: 0px;
        right: 0px;
        height: 2px;
        background: rgba(255, 255, 255, 0.25);
        border-radius: 1px;
    }
    #navbar-footer .footer {
        display: none;
    }
    .footer {
        background: linear-gradient(135deg, #042a4b, #0e3a53);
        color: #b7bcc2;
    }
    #about .button .contact {
        margin-left: 3px;
    }
    #contact .resume-section {
        padding: 20px 15px !important;
    }
    .contact-form {
        padding: 20px;
    }  
    .form-control.compact-input {
        height: 38px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    .gender-select {
        padding-left: 32px;
        font-size: 16px; /* Prevents zoom on iOS */
    } 
    .gender-icons {
        left: 6px;
    }  
    .gender-icon i {
        font-size: 12px; /* Smaller icons on mobile */
    }
    #contact .submit-btn {
        width: 100%;
        min-width: auto;
    }
    #contact .social-icon {
        min-width: 100px;
        padding: 12px 10px;
    }   
    #contact .social-icon span {
        font-size: 1.1rem;
    }
    #about .list-social-icons {
        margin-left: -5px;
    }
    .button .contact {
        margin-left: 15px;
        position: absolute;
    }
    #education .float-left {
        margin-left: 10px;
        margin-bottom: 5px;
    }
    #education .resume-date {
        margin-left: 20px;
    }
    .button .filled {
        margin-bottom: 15px;
    }
    #experience .pdf-container img {
        width: 70%;
        height: auto;
        border: none;
    }
    #skills .skill-col {
        margin-bottom: 25px;
    }
    #skills .skill-card-alt ul {
        padding-left: 40px;
    }
    #skills .skill-icon-alt {
        margin-left: -17px;
    } 
    #skills .skill-card-simple {
        margin-bottom: 30px;
    }
    #skills .tools-section {
        margin-top: 20px !important;
    }
    #projects .project-img {
        margin-left: 0px;
    }
    #projects .project-info {
        padding-top: 15px;
        padding-left: 15px;
    }
    #projects .category-filter {
        position: sticky;
        top: 80px;
        padding: 10px 0;
    }
    #projects .filter-btn {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
    #projects .project-badge {
        position: relative;
        top: auto;
        right: auto;
        display: inline-block;
        margin-bottom: 0px;
    }
    #publications .pdf-container img {
        width: 70%;
        height: auto;
        border: none;
    }
    #certification .float-left {
        margin-left: 20px;
        margin-bottom: 5px;
    }
    #certification .resume-date {
        margin-left: 20px;
    }
    .button .certificate {
        margin-top: 15px;
        margin-left: 20px;
    }
    .pdf-container {
        height: 60vh;
    }
    .error-img img {
        max-width: 40%; 
        height: auto;
    }
    #contact .form-control.gender-select {
        padding: 3px 50px;
    }
    #contact .gender-icons {
        left: 20px;
    }
}

@media (max-width: 360.98px) {
    /* Navbar adjustments */
    #sideNav {
        padding: 0.3rem 0.8rem;
    }
    #sideNav .navbar-toggler {
        margin-left: auto;
    }
    /*
    #sideNav .navbar-brand {
        font-size: 1.2rem;
        font-weight: bold;
    }
    */
    #navbarSupportedContent.show .navbar-nav {
        position: relative;
        padding-top: 15px;
    }
    #navbarSupportedContent.show .navbar-nav::before {
        content: '';
        position: absolute;
        top: 5px;
        left: 0px;
        right: 0px;
        height: 2px;
        background: rgba(255, 255, 255, 0.25);
        border-radius: 1px;
    }
    .mobile-logo-text .first-name {
        font-size: 1.1rem;
    }   
    .mobile-logo-text .last-name {
        font-size: 1.1rem;
    }    
    .mobile-logo-image-wrapper {
        width: 35px;
        height: 35px;
        background-size: 25px 25px;
    }  
    /* 
    .mobile-logo-image-wrapper img {
        width: 31px;
        height: 31px;
    }  
    */ 
    .mobile-logo-with-name {
        gap: 6px;
    }    
    #navbar-footer .footer {
        display: none;
    }
    .footer {
        background: linear-gradient(135deg, #042a4b, #0e3a53);
        color: #b7bcc2;
    }  
    #about .button .contact {
        margin-left: 0px;
    } 
    /* Contact form adjustments */
    #contact .resume-section {
        padding: 15px 10px !important;
    }   
    .contact-form {
        padding: 15px;
    }    
    .form-control.compact-input {
        height: 36px;
        font-size: 14px;
    }    
    .gender-select {
        padding-left: 28px;
        font-size: 14px;
    }    
    .gender-icon i {
        font-size: 10px;
    }    
    #contact .social-icon {
        min-width: 90px;
        padding: 10px 8px;
        font-size: 1rem;
    }   
    #contact .social-icon span {
        font-size: 1rem;
    }   
    /* Education adjustments */
    #education .float-left {
        margin-left: 5px;
    }   
    #education .resume-date {
        margin-left: 15px;
    }   
    /* Skills adjustments */
    #skills .skills-container {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }  
    #skills .skill-col {
        margin-top: 15px;;
    }  
    #skills .skill-card-alt ul {
        padding-left: 30px;
    }   
    #skills .skill-icon-alt {
        margin-left: -17px;
    } 
    #skills .skill-title-alt {
        margin-left: -10px;
    }
    #skills .skill-card-simple {
        margin-top: 15px;
    }  
    /* Projects adjustments */
    #projects .category-filter {
        top: 70px;
        padding: 8px 0;
    }   
    #projects .filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
        margin: 2px;
    }
    #projects .category-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        padding: 8px;
    }
    #projects .category-title {
        font-size: 1.8rem;
    }
    #projects .project-badge {
        position: relative;
        top: auto;
        right: auto;
        display: inline-block;
        margin-bottom: 0px;
    }
    /* Certification adjustments */
    #certification .float-left {
        margin-left: 15px;
    }
    #certification .resume-date {
        margin-left: 15px;
    }
    .button .certificate {
        margin-left: 15px;
    }
    /* PDF viewer adjustments */
    .pdf-container {
        height: 50vh;
    }
    .error-img img {
        max-width: 50%;
    }
    #viewer .error-container img {
        max-width: 35%;
    }
    /* Social icons in contact */
    .social-icons {
        flex-direction: column;
    } 
    .social-icon {
        min-width: 100%;
        flex: none;
    }
}
