/* responsiveness.css */

/* Large Devices (Desktops) */
@media (max-width: 1200px) {
    .nav-links li {
        margin: 0 10px;
    }
    
    .search-box.active {
        width: 220px;
    }
}

/* Medium Devices (Laptops) */
@media (max-width: 992px) {
    header {
        height: 100px;
    }
    
    .logo-img {
        height: 70px;
    }
    
    .nav-links li {
        margin: 0 8px;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
    
    .nav-link i {
        font-size: 1rem;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-photo {
        flex: 0 0 auto;
        width: 250px;
        margin: 0 auto;
    }
    
    .contact-content {
        flex-direction: column;
    }
    
    .skills-container {
        flex-direction: column;
        align-items: center;
    }
    
    .skills-category {
        max-width: 500px;
        width: 100%;
    }
    
    .search-box.active {
        width: 200px;
    }
    
    .search-results {
        width: 350px;
    }
    
    .loader-logo-img {
        height: 140px;
    }
}

/* Small Devices (Tablets) */
@media (max-width: 768px) {
    header {
        height: 80px;
    }
    
    .logo-img {
        height: 50px;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .nav-link {
        font-size: 1.1rem;
        padding: 10px 0;
    }
    
    .search-container {
        position: static;
        order: 2;
        padding-left: 0;
    }
    
    .search-box {
        right: 50px; /* Make room for hamburger */
    }
    
    .search-box.active {
        width: 180px;
    }
    
    .search-results {
        width: 300px;
        right: 50px;
    }
    
    .hamburger {
        display: flex;
        order: 3;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
        text-align: left;
    }
    
    .timeline-item:nth-child(even) {
        left: 0%;
    }
    
    .timeline-icon {
        left: 20px;
    }
    
    .timeline-item:nth-child(odd) .timeline-icon {
        right: auto;
    }
    
    .timeline-item:nth-child(even) .timeline-icon {
        left: 20px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .loader-logo-img {
        height: 110px;
    }
}

/* Extra Small Devices (Phones) */
@media (max-width: 576px) {
    .logo-img {
        height: 40px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 80%;
        margin: 10px auto;
    }
    
    .projects-grid,
    .certificates-grid,
    .activities-grid {
        grid-template-columns: 1fr;
    }
    
    .about-photo {
        width: 200px;
    }
    
    .skills-category {
        min-width: 100%;
    }
    
    .search-box.active {
        width: 150px;
    }
    
    .search-results {
        width: 250px;
        right: 50px;
    }
    
    .search-toggle {
        width: 35px;
        height: 35px;
    }
    
    .loader-logo-img {
        height: 90px;
    }
}

/* Ultra Small Devices (Small Phones) */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .nav-links {
        width: 85%;
    }
    
    .search-box.active {
        width: 120px;
    }
    
    .search-results {
        width: 220px;
    }
    
    .loader-logo-img {
        height: 70px;
    }
}

/* Landscape Orientation Adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding-top: 80px;
        height: auto;
        min-height: 100vh;
    }
    
    .hero-content {
        padding: 40px 20px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        margin-bottom: 30px;
        font-size: 2rem;
    }
    
    .timeline-item {
        padding: 15px 30px;
    }
    
    .timeline-icon {
        top: 20px;
        width: 40px;
        height: 40px;
    }
    
    .timeline-item:nth-child(odd) .timeline-icon {
        right: -20px;
    }
    
    .timeline-item:nth-child(even) .timeline-icon {
        left: -20px;
    }
}

/* High Resolution Devices */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-img,
    .profile-img,
    .loader-logo-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    header, footer, .hamburger, .search-container, .hero-buttons, #backToTop {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .section {
        padding: 20px 0;
        page-break-inside: avoid;
    }
    
    .section-title {
        font-size: 18pt;
        margin-bottom: 15pt;
    }
    
    .project-card, .certificate-card, .activity-card {
        break-inside: avoid;
        margin-bottom: 15pt;
    }
    
    .timeline-item {
        break-inside: avoid;
    }
    
    a {
        text-decoration: none;
        color: #000;
    }
    
    a::after {
        content: " (" attr(href) ")";
        font-size: 10pt;
    }
}
/* responsiveness.css */

/* Tablet Navigation (768px and below) */
@media (max-width: 768px) {
    header {
        height: 80px;
    }
    
    .logo-img {
        height: 50px;
    }
    
    /* Hamburger Menu */
    .hamburger {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        z-index: 1001;
        order: 3;
        margin-left: 15px;
    }
    
    .hamburger span {
        width: 25px;
        height: 3px;
        background-color: var(--dark-color);
        margin: 3px 0;
        transition: var(--transition);
    }
    
    /* Slide Navigation Panel */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 80px;
        transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        overflow-y: auto;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 15px 0;
        width: 100%;
        text-align: center;
    }
    
    .nav-link {
        font-size: 1.2rem;
        padding: 12px 0;
        width: 100%;
        display: block;
        color: var(--dark-color);
        position: relative;
        transition: var(--transition);
    }
    
    .nav-link::after {
        display: none;
    }
    
    .nav-link:hover {
        background-color: rgba(52, 152, 219, 0.1);
        color: var(--primary-color);
    }
    
    /* Close Button */
    .nav-close {
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 2rem;
        color: var(--dark-color);
        cursor: pointer;
        display: none;
        z-index: 1002;
    }
    
    .nav-links.active .nav-close {
        display: block;
    }
    
    /* Overlay */
    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    
    .overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Search Container Adjustments */
    .search-container {
        position: static;
        order: 2;
        padding-left: 0;
    }
    
    .search-box {
        right: 50px;
    }
    
    .search-box.active {
        width: 180px;
    }
    
    .search-results {
        width: 300px;
        right: 50px;
    }
    
    /* Hamburger Animation */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Hero Section Adjustments */
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    /* Timeline Adjustments */
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
        text-align: left;
    }
    
    .timeline-item:nth-child(even) {
        left: 0%;
    }
    
    .timeline-icon {
        left: 20px;
    }
    
    .timeline-item:nth-child(odd) .timeline-icon {
        right: auto;
    }
    
    .timeline-item:nth-child(even) .timeline-icon {
        left: 20px;
    }
    
    /* Skills Grid */
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    /* Loader Logo */
    .loader-logo-img {
        height: 110px;
    }
}

/* Large Phone Navigation (576px and below) */
@media (max-width: 576px) {
    .logo-img {
        height: 40px;
    }
    
    /* Adjust slide navigation width */
    .nav-links {
        width: 80%;
    }
    
    /* Adjust navigation link sizes */
    .nav-link {
        font-size: 1.1rem;
        padding: 15px 0;
    }
    
    /* Adjust close button position */
    .nav-close {
        top: 15px;
        right: 15px;
        font-size: 1.8rem;
    }
    
    /* Hero Section Adjustments */
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 80%;
        margin: 10px auto;
    }
    
    .projects-grid,
    .certificates-grid,
    .activities-grid {
        grid-template-columns: 1fr;
    }
    
    .about-photo {
        width: 200px;
    }
    
    .skills-category {
        min-width: 100%;
    }
    
    /* Search Adjustments */
    .search-box.active {
        width: 150px;
    }
    
    .search-results {
        width: 250px;
        right: 50px;
    }
    
    .search-toggle {
        width: 35px;
        height: 35px;
    }
    
    .loader-logo-img {
        height: 90px;
    }
}

/* Small Phone Navigation (375px and below) */
@media (max-width: 375px) {
    .logo-img {
        height: 35px;
    }
    
    /* Adjust slide navigation width for small screens */
    .nav-links {
        width: 85%;
        padding-top: 70px;
    }
    
    /* Adjust navigation link sizes */
    .nav-link {
        font-size: 1rem;
        padding: 12px 0;
    }
    
    .nav-links li {
        margin: 10px 0;
    }
    
    /* Adjust close button */
    .nav-close {
        top: 12px;
        right: 12px;
        font-size: 1.5rem;
    }
    
    /* Hero Section Adjustments */
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* Search Adjustments */
    .search-box.active {
        width: 120px;
    }
    
    .search-results {
        width: 220px;
    }
    
    .search-toggle {
        width: 30px;
        height: 30px;
    }
    
    .loader-logo-img {
        height: 70px;
    }
}

/* Landscape Orientation Adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    /* Adjust navigation for landscape mode */
    .nav-links {
        padding-top: 60px;
        justify-content: center;
    }
    
    .nav-links li {
        margin: 8px 0;
    }
    
    .nav-link {
        font-size: 1rem;
        padding: 8px 0;
    }
    
    .nav-close {
        top: 10px;
        right: 10px;
        font-size: 1.5rem;
    }
}