/* ============================= */


/* GLOBAL RESPONSIVE FOUNDATION */


/* ============================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

section {
    padding: 80px 10%;
}

.container,
.about-container,
.contact-container,
.footer-container {
    width: 100%;
    max-width: 1200px;
    margin: auto;
}


/* ============================= */


/* LARGE DESKTOP (1440px+) */


/* ============================= */

@media (min-width: 1441px) {
    section {
        padding: 100px 15%;
    }
    .home-content h1 {
        font-size: 3.5rem;
    }
    .home-content h2 {
        font-size: 2rem;
    }
}


/* ============================= */


/* LAPTOP (1025px – 1440px) */


/* ============================= */

@media (max-width: 1440px) {
    section {
        padding: 80px 8%;
    }
}


/* ============================= */


/* TABLET (768px – 1024px) */


/* ============================= */

@media (max-width: 1024px) {
    section {
        padding: 70px 6%;
    }
    /* HERO */
    .home {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    .home-img img {
        width: 250px;
        margin: auto;
    }
    /* ABOUT - Keep in row format on tablet */
    .about-container {
        flex-direction: row;
        gap: 30px;
    }
    .about-cards {
        display: flex;
        flex-direction: row;
        gap: 20px;
    }
    /* SKILLS */
    .skill-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    /* PROJECTS */
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    /* CONTACT */
    .contact-container {
        flex-direction: column;
        gap: 30px;
    }
    /* FOOTER */
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}


/* ============================= */


/* MOBILE LARGE (481px–767px) */


/* ============================= */

@media (max-width: 767px) {
    section {
        padding: 60px 5%;
    }
    /* NAVBAR */
    .navbar {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 260px;
        height: calc(100vh - 70px);
        background: #111;
        flex-direction: column;
        padding: 20px;
        transition: 0.3s;
    }
    .navbar.active {
        right: 0;
    }
    .menu-toggle {
        display: block;
        font-size: 22px;
        cursor: pointer;
    }
    /* HERO */
    .home-content h1 {
        font-size: 2rem;
    }
    .home-content h2 {
        font-size: 1.2rem;
    }
    .home-content p {
        font-size: 0.95rem;
    }
    .home-img img {
        width: 200px;
    }
    /* ABOUT */
    .about-cards {
        grid-template-columns: 1fr;
    }
    /* SKILLS */
    .skill-cards-grid {
        grid-template-columns: 1fr;
    }
    /* PROJECTS */
    .projects-grid {
        grid-template-columns: 1fr;
    }
    /* EXPERIENCE CARDS */
    .experience-summary {
        flex-direction: column;
        gap: 20px;
    }
    /* CONTACT */
    .contact-container {
        flex-direction: column;
    }
    /* FOOTER */
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
}


/* ============================= */


/* MOBILE SMALL (320px–480px) */


/* ============================= */

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    section {
        padding: 50px 4%;
    }
    .logo {
        font-size: 18px;
    }
    .home-content h1 {
        font-size: 1.7rem;
    }
    .home-content h2 {
        font-size: 1rem;
    }
    .home-content p {
        font-size: 0.9rem;
    }
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    .section-title {
        font-size: 1.6rem;
    }
}


/* ============================= */


/* GRID AUTO RESPONSIVE */


/* ============================= */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.skill-cards-grid,
.about-cards,
.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}


/* ============================= */


/* FLEX SAFE RESPONSIVE */


/* ============================= */

.home,
.about-container,
.contact-container,
.experience-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
}


/* TEXT SAFE */


/* ============================= */

h1,
h2,
h3,
h4,
p {
    word-wrap: break-word;
}


/* ============================= */


/* BUTTON SAFE */


/* ============================= */

.btn,
.project-btn,
.submit-btn {
    width: fit-content;
    max-width: 100%;
}


/* ============================= */


/* FORM SAFE */


/* ============================= */

input,
textarea {
    width: 100%;
}


/* ============================= */


/* IMAGE SAFE */


/* ============================= */

.project-card img,
.home-img img,
.achievement-image img {
    width: 100%;
    height: auto;
}