@import url('https://fonts.googleapis.com/css2?family=Itim&family=Sour+Gummy:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --primary-color: #e9615e;
    --secondary-color: #ec9956;
    --extra-light: #f3f4f6;
    --white: #ffff;
    /*--gradient-1: linear-gradient(to bottom right, #62393c, #181e41);*/
    --gradient-1: linear-gradient(to bottom right, #333399, #43c6ac);
    --gradient-2: linear-gradient(to bottom,
            var(--primary-color),
            var(--secondary-color));
    --max-width: 1200px;
}


* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.section_container {
    max-width: var(--max-width);
    margin: auto;
    padding: 5rem 1rem;
}

.section_header {
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
}

.section_description {
    max-width: 600px;
    margin-inline: auto;
    color: var(--extra-light);
    text-align: center;
    line-height: 1.75rem;
}

.btn {
    padding: .75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--white);
    background-image: var(--gradient-2);
    outline: none;
    border: none;
    border-radius: 5rem;
    cursor: pointer;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
}

img {
    width: 100%;
    display: flex;
}

a {
    text-decoration: none;
}

.logo {
    display: inline-block;
    padding: 10px 14px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    background-image: var(--gradient-2);
    border-radius: 100%;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
}

html,
body {
    scroll-behavior: smooth;
}

body {
    font-family: "Sour Gummy", sans-serif;
    color: var(--white);
    background-image: var(--gradient-1);
}

nav {
    position: fixed;
    isolation: isolate;
    top: 0;
    width: 100%;
    max-width: var(--max-width);
    margin: auto;
    z-index: 9;
}

.nav_bar {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    background-image: var(--gradient-1);
}

.nav_logo {
    padding: 9px 12px;
    font-size: 1.2rem;
}

.nav_bar a {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--white);
}

.nav_menu_btn {
    font-size: 1.5rem;
    color: var(--white);
    cursor: pointer;
}

.nav_links {
    list-style: none;
    position: absolute;
    width: 100%;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    background-image: var(--gradient-2);
    transform: translateY(-100%);
    transition: 0.5s;
    z-index: -1;
}

.nav_links.open {
    /* transform: translateY(0); */
    transform: translateY(0); /* Brings the menu into view */
    z-index: 10; /* Ensures it appears above other elements */
}

.nav_links a {
    color: var(--white);
    transition: 0.3s;
}

.nav_links a:hover {
    color: var(--white);
}

.btn_large {
    display: none;
}

.header_container {
    padding-top: 8rem;
    display: grid;
    gap: 2rem;
    isolation: isolate;
}

.header_content {
    text-align: center;
}

.header_content h1 {
    margin-bottom: 1rem;
    font-size: 3rem;
    text-align: center;
}

.header_content .section_description {
    margin-bottom: 2rem;
}

.header_image {
    position: relative;
    isolation: isolate;
    z-index: -1;
}

.header_image img {
    max-width: 450px;
    margin-inline: auto;
    border-radius: 25rem;
}

.header_image::after {
    position: absolute;
    content: "JOHN GABRIEL";
    letter-spacing: 1.5rem;
    opacity: 1rem;
    right: 1rem;
    top: 50%;
    transform: translate(50%, -50%) rotate(90deg);
}

.about_container {
    display: grid;
    gap: 2rem;
}

.about_image {
    position: relative;
    isolation: isolate;
    max-width: 400px;
    margin: auto;
}

.about_img {
    border-radius: 100%;
}

.about_bg-1,
.about_bg-2 {
    position: absolute;
    max-width: 150px;
    z-index: -1;
}

.about_bg-1 {
    top: 0;
    left: 0;
}

.about_bg-2 {
    right: 0;
    bottom: 0;
}

.about_content {
    text-align: center;
}

.about_content .section_description {
    margin-bottom: 2rem;
}

.service_grid {
    margin-top: 2rem;
    display: grid;
    gap: 1rem;
}

.service_card {
    padding: 2rem 1rem;
    text-align: center;
    background-image: var(--gradient-2);
    border-radius: 1rem;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
}

.service_card span {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.service_card h4 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.service_card p {
    color: var(--extra-light);
    line-height: 2rem;
}

.portfolio__grid {
    margin-top: 2rem;
    display: grid;
    gap: 1rem;
}

.portfolio__card {
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
}

.portfolio__card img {
    transition: 0.5s;
}

.portfolio__card:hover img {
    transform: scale(1.1);
}

.contact__container {
    margin-top: 50px;
    /* Add margin at the top */
    text-align: center;
    /* Center-align the content */
    padding: 30px 20px;
    /* Add padding for spacing inside the section */
    border-radius: 10px;
    /* Optional: Rounded corners */
}

.contact__socials {
    margin-top: 20px;
    /* Add spacing above the social icons */
}

.contact__socials a {
    padding: 7px 10px;
    font-size: 1.5rem;
    color: var(--white);
    background: rgba(255, 255, 255, 0.2);
    border-radius: 100%;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
    margin: 0 10px;
}

.contact__socials a:hover {
    color: var(--primary-color);
    /* Change color on hover */
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
}

/* Skills Section */
.skills_container {
    text-align: center;
    padding: 50px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.skill_names {
    position: relative;
    width: 250px;
    height: 250px;
    transform-style: preserve-3d;
    animation: animate 20s linear infinite;
}

@keyframes animate {
    0% {
        transform: perspective(1000px) rotateY(0deg);
    }
    100% {
        transform: perspective(1000px) rotateY(360deg);
    }
}

.skill_names img {
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 200px;
    transform-origin: center;
    transform-style: preserve-3d;
    transform: rotateY(calc(var(--i) * 36deg)) translateZ(450px);
    transition: 0.5s;
    border-radius: 15px;
    border: 4px solid rgb(234, 224, 224);
    -webkit-box-reflect: below 2px linear-gradient(transparent, transparent, rgba(4, 4, 4, 0.267));
}

.skill_names img:hover {
    transform: rotateY(calc(var(--i) * 36deg)) translateZ(450px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal_content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal_content p {
    margin-bottom: 20px;
    font-size: 18px;
    color: #333;
}

.modal_content .btn {
    background: #007bff;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.modal_content .btn:hover {
    background: #0056b3;
}

.footer {
    padding: 1rem;
    font-size: 0.9rem;
    color: var(--extra-light);
    text-align: center;
}

@media (width > 576px) {
    .service_grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio__banner {
        grid-template-columns: repeat(2, 1fr);
        text-align: left;
    }
}

@media (width > 768px) {
    nav {
        padding: 2rem 1rem;
        position: static;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .nav_bar {
        padding: 0;
        background-image: none;
    }

    .nav_menu_btn {
        display: none;
    }

    .nav_links {
        padding: 0;
        width: unset;
        position: static;
        transform: none;
        flex-direction: row;
        background-image: none;
    }

    .nav_links a:hover {
        color: var(--secondary-color);
    }

    .nav_links li:last-child {
        display: none;
    }

    .btn_large {
        display: flex;
    }

    .header_container {
        padding-top: 5rem;
        grid-template-columns: repeat(4, 1fr);
        align-items: center;
    }

    .header_image {
        grid-area: 1/3/2/5;
    }

    .header_image img {
        margin-inline-start: unset;
    }

    .header_content {
        grid-area: 1/1/2/4;
        text-align: left;
    }

    .header_content h1 {
        font-size: 6rem;
        line-height: 6rem;
        text-align: left;
    }

    .header_content .section_description {
        text-align: left;
        margin-inline-start: unset;
    }

    .about_container {
        grid-template-columns: repeat(2, 1fr);
        align-items: center;
    }

    .about_content,
    .about_content :is(.section_header, .section_description) {
        text-align: left;
    }

    .service_grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .portfolio__container :is(.section__header, .section__description) {
        text-align: left;
        margin-inline-start: unset;
    }

    .portfolio__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .portfolio__banner {
        grid-template-columns: repeat(3, 1fr);
    }
}

.contact_section {
    text-align: center;
    padding: 50px 20px;
    /* background-color: #f9f9f9; */
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.contact_content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
}

.contact_info {
    flex: 1;
    max-width: 60%;
    /* Center the contact info with a smaller width */
    margin-top: 40px;
    text-align: center;
    /* Center-align the text */
    color: #fff;
    /* Make text white */
    display: flex;
    flex-direction: column;
    /* Stack items vertically */
    gap: 20px;
    /* Add spacing between items */
}

.contact_item {
    display: flex;
    align-items: center;
    /* Align icon and text vertically */
    justify-content: center;
    /* Center the icon and text horizontally */
    gap: 15px;
    /* Add spacing between the icon and text */
    font-size: 1rem;
    /* Adjust font size */
    color: #fff;
    /* Make text white */
}

.contact_item i {
    font-size: 2rem;
    /* Adjust icon size */
    color: #fff;
    /* Make icon white */
}

.contact_item a {
    color: #fff;
    /* Ensure links are white */
    text-decoration: none;
    /* Remove underline from links */
    transition: color 0.3s ease;
    /* Add hover effect */
}

.contact_item a:hover {
    color: var(--primary-color);
    /* Change color on hover */
}

.contact_form_container {
    flex: 1;
    max-width: 45%;
}

.contact_form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form_group input,
.form_group textarea {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form_group input:focus,
.form_group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

textarea {
    resize: none;
}

.contact_form .btn {
    padding: 15px;
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    background-image: var(--gradient-2);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.contact_form .btn:hover {
    background-color: var(--secondary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .contact_content {
        flex-direction: column;
        align-items: center;
    }

    .contact_info,
    .contact_form_container {
        max-width: 100%;
    }
}

/* Back to Top Button */
.back_to_top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.back_to_top i {
    font-size: 24px;
}

.back_to_top:hover {
    background-color: #0056b3;
}

.back_to_top.show {
    opacity: 1;
    visibility: visible;
}