:root {
    --header-height: 3.5rem;
    --white-color: hsl(0, 0%, 100%);
    --black-color: hsl(0, 0%, 0%);
    --blue-color: #3e6ff4;

    /*========== Font and typography ==========*/
    /*.5rem = 8px | 1rem = 16px ...*/
    --body-font: "National Park", sans-serif;
    --h1-font-size: 1.5rem;
    --normal-font-size: .938rem;

    /*========== Font weight ==========*/
    --font-regular: 400;
    --font-medium: 500;

    /*========== z index ==========*/
    --z-tooltip: 10;
    --z-fixed: 100;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1150px) {
    :root {
        --normal-font-size: 1rem;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font), sans-serif;
    font-size: var(--normal-font-size);
    background-color: var(--white-color);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
    max-width: 1120px;
    margin-inline: 1.5rem;
}

/*=============== HEADER & NAV ===============*/
.header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background-color: var(--blue-color);
    z-index: var(--z-fixed);
}

.nav {
    position: relative;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    color: var(--white-color);
    font-weight: var(--font-medium);
}

.nav__close,
.nav__toggle {
    display: flex;
    color: var(--white-color);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Navigation for mobile devices */
@media screen and (max-width: 1150px) {
    .nav__menu {
        position: fixed;
        left: -100%;
        top: 0;
        background-color: var(--blue-color);
        width: 100%;
        height: 100%;
        padding: 6rem 3.5rem 4.5rem;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        transition: left .4s;
    }

    .nav__item {
        transform: translateX(-150px);
        visibility: hidden;
        transition: transform .4s ease-out, visibility .4s;
    }

    .nav__item:nth-child(1) {
        transition-delay: .1s;
    }
    .nav__item:nth-child(2) {
        transition-delay: .2s;
    }
    .nav__item:nth-child(3) {
        transition-delay: .3s;
    }
    .nav__item:nth-child(4) {
        transition-delay: .4s;
    }
    .nav__item:nth-child(5) {
        transition-delay: .5s;
    }
}

.nav__list,
.nav__social {
    display: flex;
}

.nav__list {
    flex-direction: column;
    row-gap: 3rem;
}

.nav__link {
    position: relative;
    color: var(--white-color);
    font-size: var(--h1-font-size);
    font-weight: var(--font-medium);
    display: inline-flex;
    align-items: center;
    transition: opacity .4s;
}

.nav__link i {
    font-size: 2rem;
    position: absolute;
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s, visibility .4s;
}

.nav__link span {
    position: relative;
    transition: margin .4s;
}

.nav__link span::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background-color: var(--white-color);
    transition: width .4s ease-out;
}

/* Animation link on hover */
.nav__link:hover span {
    margin-left: 2.5rem;
}

.nav__link:hover i {
    opacity: 1;
    visibility: visible;
}

.nav__link:hover span::after {
    width: 100%;
}

/* Sibling fade animation */
.nav__list:has(.nav__link:hover) .nav__link:not(:hover) {
    opacity: .4;
}

.nav__close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.nav__social {
    column-gap: 1rem;
}

.nav__social-link {
    color: var(--white-color);
    font-size: 1.5rem;
    transition: transform .4s;
}

.nav__social-link:hover {
    transform: translateY(-.25rem);
}

/* Show menu */
.show-menu {
    left: 0;
}

/* Animation link when displaying menu */
.show-menu .nav__item {
    visibility: visible;
    transform: translateX(0);
}

/*=============== BREAKPOINTS ===============*/
/* For large devices */
@media screen and (min-width: 1150px) {
    .container {
        margin-inline: auto;
    }

    .nav {
        height: calc(var(--header-height) + 2rem);
    }

    .nav__toggle,
    .nav__close {
        display: none;
    }

    .nav__link {
        font-size: var(--normal-font-size);
    }

    .nav__link i {
        font-size: 1.5rem;
    }

    .nav__list {
        flex-direction: row;
        column-gap: 3.5rem;
    }

    .nav__menu {
        display: flex;
        align-items: center;
        column-gap: 3.5rem;
    }
}

/*hero section*/
.hero {
    padding-top: 120px;
}

.hero-container {
    max-width: 1120px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 20px;
    padding: 0 20px;
    align-items: center;
}

.hero-text p {
    font-size: 30px;
    margin-bottom: 45px;
}

.hero-text h1 {
    font-size: 40px;
}

.hero-text > *:nth-child(3) {
    margin-bottom: 45px;
}

.hero-btn {
    display: inline-block;
    color: #fff;
    background: var(--blue-color);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 20px;
    transition: transform 0.3s;
    outline: none;
}

.hero-btn:hover {
    transform: scale(1.2);
}

.hero-text span {
    color: var(--blue-color);
}

.hero img {
    width: 100%;
    border: 30px solid var(--blue-color);
    border-radius: 50%;
}

@media (max-width: 520px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* About */
.about {
    padding: 0 20px 100px;
}

.about-heading {
    text-align: center;
}

.about-heading h1 {
    color: var(--blue-color);
    display: inline-block;
    border-bottom: 5px solid var(--blue-color);
    margin: 100px 0;
}

.about-container {
    max-width: 1120px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 2rem;
    align-items: center;
}

.about-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.about-text h1 {
    margin-bottom: 20px;
}

.about-text p {
    font-size: 20px;
    line-height: 1.5;
    /*text-align: justify;*/
}

@media (max-width: 532px) {
    .about-container {
        grid-template-columns: 1fr;
    }

    .about {
        padding-bottom: 40px;
    }
}

/* skills */
.skills {
    padding: 0 20px 100px;
}

.skills-heading {
    text-align: center;
}

.skills-heading h1 {
    color: var(--blue-color);
    border-bottom: 5px solid var(--blue-color);
    display: inline-block;
    margin: 100px 0;
}

.skills-inner-container {
    max-width: 1120px;
    margin: auto;
}

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

.skills-text p {
    font-size: 20px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.skills-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

@media (max-width: 532px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .skills-heading h1 {
        margin: 70px 0;
    }
}

/* work */
.work {
    padding: 0 20px 100px;
}

.work-container {
    max-width: 1120px;
    margin: auto;
}

.work-heading {
    text-align: center;
}

.work-heading h1 {
    color: var(--blue-color);
    border-bottom: 5px solid var(--blue-color);
    display: inline-block;
    margin: 100px 0;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 1.5rem;
}

.work-img {
    border-radius: 10px;
    overflow: hidden;
}

.work-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

@media (max-width: 639px) {
    .work-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .work-heading h1 {
        margin: 0 0 100px;
    }
}

@media (max-width: 532px) {
    .work-grid {
        grid-template-columns: 1fr;
    }
}

/* contact */
.contact {
    padding: 0 20px 100px;
}

.contact-heading {
    text-align: center;
}

.contact-heading h1 {
    color: var(--blue-color);
    border-bottom: 5px solid var(--blue-color);
    display: inline-block;
    margin: 50px 0;
}

.contact-container {
    max-width: 1120px;
    margin: auto;
}

.contact-form {
    text-align: center;
}

form > input[type="text"] {
    width: 400px;
    height: 30px;
    border-radius: 7px;
}

form input[type="email"] {
    width: 400px;
    height: 30px;
    border-radius: 7px;
}

form textarea {
    width: 400px;
    height: 300px;
    border-radius: 7px;
}

form button {
    display: inline-block;
    cursor: pointer;
    color: #fff;
    background: var(--blue-color);
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 20px;
    transition: transform 0.3s;
}

form button:hover {
    transform: scale(1.2);
}

@media (max-width: 532px) {
    form > input[type="text"] {
        width: 330px;
    }

    form input[type="email"] {
        width: 330px;
    }

    form textarea {
        width: 330px;
        height: 200px;
    }

}

/* footer */
.footer {
    padding: 100px 20px;
    background: var(--blue-color);
}

.footer-container {
    max-width: 1120px;
    margin: auto;
}

.footer-flex {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.footer-flex > *:first-child {
    margin-bottom: 20px;
}
