/* touchscreens */
@media (hover: none) and (pointer: coarse) {
    /* remove grayscale-to-color animation */
    #tools .tech-logos img {
        filter: none;
        opacity: 1;
        transform: none;
    }

    /* touch-friendly card overlay */
    .project-overlay {
        inset: auto 0 0 0;
        height: auto;
        opacity: 1;

        display: flex;
        align-items: center;
        justify-content: center;

        padding: 12px 10px;

        background: rgba(0, 0, 0, 0.75);
        z-index: 1;
    }

    .project-overlay h3 {
        font-size: 1.1rem;
        margin: 0;
        text-align: center;
    }

    .close-btn {
        display: none;
    }
}

/* hamburger menu for smaller screens (or touchscreens) */
@media (max-width: 1200px), (hover: none) and (pointer: coarse){
    .nav-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--nav-bg);
        padding: 1rem;

        flex-direction: column;

        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;

        transition: transform 0.25s ease-out, opacity 0.2s ease-out;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }    
}

/* smaller screen styling */
@media (max-width: 1368px) {
    /* re-size text */
    body {
        line-height: 1.7;
    }
    
    /* re-size employer logos */
    .job-logo {
        width: 140px;
    }

    .job-logo img {
        max-height: 64px;
    }

    #tools .tech-logos img {
        width: 64px;
    }
    
    /* re-size iconography*/
    .modal-link {
        display: flex;
        align-items: center;
        justify-content: center;

        width: 56px;
        height: 56px;
    }

    .modal-link img {
        max-width: 50px;
    }

    footer a {
        display: inline-flex;
        align-items: center;
        justify-content: center;

        width: 56px;
        height: 56px;
    }

    footer img {
        width: 50px;
    }

    #top-arrow {
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
    }
}

/* for phones in portrait view */
@media (max-width: 767px) {
    /* re-size employer logos */
    .job {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .job-logo {
        width: 160px;
        margin-bottom: 12px;
    }

    .job-date {
        text-align: center;
    }

    /* employer & work dates on separate lines */
    .job-header {
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }
}

/* tech logo colorize animation for PC only */
@media (hover: hover) and (pointer: fine) {
    /* colorize animation on hover */
    #tools .tech-logos img {
        width: 50px;
        height: auto;
        filter: grayscale(100%) opacity(0.85);
        transition: filter 0.2s ease, transform 0.2s ease;
    }

    #tools .tech-logos img:hover {
        filter: grayscale(0%) opacity(1);
        transform: translateY(-5px);
    }
}