* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    text-decoration: none;
    scroll-behavior: smooth;
}

:root {
    --font-family-primary: "Lato", sans-serif;
    --font-family-secondary: "Antic Didone", serif;
    --color-hover: #fcf4ff;
}

.page {
    font-family: var(--font-family-primary), Arial, sans-serif;
    line-height: 1.8;
    overflow-x: hidden;
}

/* global button styles */
.button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2.5rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    gap: 0.5rem;
}

.button--primary {
    background: linear-gradient(to right, purple, rgb(114, 114, 239));
    color: white;
}

.button--secondary {
    border: 1px solid #6b7280;
    background: white;
    color: black;
}

.button-icon {
    width: 1rem;
}

.button:hover {
    transform: translateY(-2px);
    background-color: #fcf4ff;
}


/* main navigation */
.header {
    width: 100%;
}

.header__nav {
    position: fixed;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.header__logo {
    width: 7rem;
    cursor: pointer;
}

.header__menu {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
    padding: 12px;
    border-radius: 999px;
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.header__menu-item {
    margin: 0 1rem;
}

.header__menu-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.header__menu-link:hover {
    color: var(--color-hover);
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header__menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
}
.header__menu-icon {
    width: 1.5rem;
}

/* scroll effect for the header */
.header__nav--scrolled {
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header__menu--hidden {
    background: transparent;
    box-shadow: none;
}


/* mobile menu */
.header__mobile-menu {
    position: fixed;
    top: 0;
    right: -16rem;
    background-color: #fcf4ff;
    width: 16rem;
    height: 100vh;
    list-style: none;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease-in-out;
}

.header__mobile-menu-close {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.header__mobile-menu-icon {
    width: 1.5rem;
    cursor: pointer;
}

.header__mobile-menu-item {
    margin: 0.5rem 0;
}

.header__mobile-menu-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    display: block;
    padding: 0.5rem 0 0.5rem 1rem;
}

.header__mobile-menu-link:hover {
    color: var(--color-hover);
}

.header__mobile-menu--open {
    transform: translateX(-16rem);
}

.header__mobile-menu--closed {
    transform: translateX(16rem);
}


/* hero section */
.hero {
    width: 91.6667%;
    max-width: 48rem;
    text-align: center;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.hero__subtitle {
    font-size: 1.5rem;
    font-family: var(--font-family-secondary);
}

.hero__title {
    font-size: 4rem;
    font-family: var(--font-family-secondary);
}

.hero__description {
    max-width: 32rem;
    margin: 0 auto;
    font-size: 1.25rem;
    font-weight: 300;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
    gap: 1rem;
}


/* about section */
.about {
    width: 100%;
    padding: 5rem 10%;
    scroll-margin-top: 20rem;
    text-align: center;
}
.about__subtitle {
    font-size: 1.25rem;
    font-family: var(--font-family-secondary);
}

.about__title {
    font-size: 4rem;
    font-family: var(--font-family-secondary);
}

.about__image-container {
    max-width: max-content;
    margin: auto;
}

.about__image {
    width: 16rem;
    border-radius: 3rem;
}

.about__text {
    text-align: left;
    margin: auto;
    max-width: 70ch;
}

.about__description {
    margin-bottom: 2rem;
    font-size: 1rem;
    font-weight: 300;
}

.about__description--strong {
    font-weight: 400;
}

.about__content {
    text-align: left;
    margin: auto;
}

.about__list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.about__list-item {
    border: 0.5px solid #888;
    border-radius: 1rem;
    padding: 2rem;
    cursor: pointer;
    transition: 0.5s;
}

.about__list-item:hover {
    background: #fcf4ff;
    transform: translateY(-1rem);
    box-shadow: 4px 4px 0 #000;
}

.about__list-icon {
    width: 1.5rem;   
}

.about__list-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #444;
}

.about__list-description {
    font-size: 1rem;
    color: #555;
}

/* tools section */
.about__tools-title {
    font-family: var(--font-family-secondary);
    margin-top: 2rem;
    color: #333;
}

.about__tools-list {
    display: flex;
    gap: 1rem;
}

.about__tools-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    aspect-ratio: 1/1;
    border: 1px solid #ccc;
    border-radius: 1rem;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.about__tools-item:hover {
    transform: translateY(-1rem);
}

.about__tools-icon {
    width: 1.25rem;
    height: auto;
}


/* projects section */
.projects {
    width: 100%;
    padding: 5rem 10%;
    scroll-margin-top: 20px;
}

.projects__subtitle {
    text-align: center;
    font-size: 1.25rem;
    font-family: var(--font-family-secondary);
}

.projects__title {
    text-align: center;
    font-size: 4rem;
    font-family: var(--font-family-secondary);
}

.projects__list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.projects__item {
    display: flex;
    align-items: center;
    gap: 3rem;
    height: max-content;
    margin-top: 3rem;
    margin-bottom: 4rem;
}

.projects__item:nth-child(2n) {
    flex-direction: row-reverse;
}

.projects__details {
    flex: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.projects__name {
    font-size: 3rem;
    font-weight: 400;
}

.projects__description {
    font-size: 1rem;
    font-weight: 300;
    text-align: justify;
    line-height: 1.8rem;
    max-width: 70ch;

}

.projects__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
    gap: 1rem;
}

.projects__more {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 3rem;;
}

/* laptop mockup */
.projects__laptop-mockup {
    width: 600px;
    height: 379px;
    flex: 1;
    position: relative;  
}

.projects__laptop-mockup-screen {
    width: 451px;
    height: 283px;
    position: absolute;
    top: 18px;
    left: 68px;
    overflow: scroll;
}

.projects__laptop-mockup-screen::-webkit-scrollbar {
    display: none;
}

.projects__laptop-mockup-image {
    width:100%;
}

/* phone mockup */
.projects__phone-mockup {
    width: 300px;
    height: 600px;
    position: relative;  
    flex: 1; 
}

.projects__phone-mockup-screen {
    width: 264px;
    height: 567px;
    top: 17px;
    left: 18px;
    border-radius: 28px;
    position: absolute;
    overflow: scroll;
}

.projects__phone-mockup-screen::-webkit-scrollbar {
    display: none;
}

.projects__phone-mockup-image {
    width: 100%;
}


/* contact section */
.contact {
    width: 100%;
    padding: 5rem 10%;
    scroll-margin-top: 20px;
    background: url('./images/footer-bg-color.png') no-repeat center;
    background-size: 90% auto;
}

.contact__subtitle {
    text-align: center;
    font-size: 1.25rem;
    font-family: var(--font-family-secondary);
}

.contact__title {
    text-align: center;
    font-size: 4rem;
    font-family: var(--font-family-secondary);
}

.contact__description {
    text-align: center;
    max-width: 40rem;
    margin: 2rem auto;
    font-size: 1rem;
    font-weight: 300;
}

.contact__form {
    max-width: 40rem;
    margin: auto;
}

.contact__fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact__input {
    flex: 1;
    outline: none;
    border: 0.5px solid gray;
    border-radius: 0.5rem;
    background: white;
    padding: 0.5rem;
    font-family: var(--font-family-primary);
}

.contact__textarea {
    width: 100%;
    outline: none;
    border: 0.5px solid gray;
    border-radius: 0.5rem;
    background: white;
    padding: 0.5rem;
    margin-bottom: 1rem;
    font-family: var(--font-family-primary);
}

.contact__button {
    margin: auto;
    border: none;
}



/* footer */
.footer {
    margin-top: 2rem;
}

.footer__logo-container {
    text-align: center;
}

.footer__logo {
    width: 7rem;
    margin: 0 auto;
}

.footer__content {
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid gray;
    margin: 2rem 10%;
    padding: 2rem 0;
}

.footer__copyright{
    font-size: 1rem;
}

.footer__socials {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer__social-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

.footer__social-link:hover {
    color: var(--color-hover);
}



/* media queries for responsive design*/
@media screen and (max-width: 1280px) {
    /* layout adjustments */
    .projects__item-laptop-responsive {
        flex-direction: column-reverse;
        gap: 3rem;
        height: max-content;
        padding: 1rem;
    }
}

@media screen and (max-width: 768px) {
    /* font sizes */
    .hero__title {
        font-size: 2.5rem;
    }

    .hero__subtitle {
        font-size: 1.25rem;
    }

    .about__title, .projects__title, .contact__title {
        font-size: 3rem;
    }

    .about__subtitle,.about__list-title, .projects__subtitle, .contact__subtitle {
        font-size: 1.125rem;
    }

    .hero__description, .projects__description, .about__list-description, .contact__description {
        font-size: 1rem;
    }

    /* layout adjustments */
    .header__menu, .header__contact-button {
        display: none;
    }

    .header__menu-toggle {
        display: block;
    }

    .hero__actions, .projects__actions {
        flex-direction: column;
        gap: 1rem;
    }

    .about__text {
        text-align: center;
    }

    .about__content {
        flex-direction: column;
        gap: 2rem;
    }

    .about__list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .projects__item {
        flex-direction: column-reverse;
        gap: 2rem;
        height: max-content;
        padding: 1rem;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }

    .projects__item:nth-child(2n) {
        flex-direction: column-reverse;
    }

    .projects__laptop-mockup {
        transform: scale(0.7);
    }

    .projects__phone-mockup {
        transform: scale(0.8);
    }

    .contact__fields {
        grid-template-columns: 1fr;
    }

    /* padding and margins */
    .hero {
        padding: 2rem 1rem;
    }

    .about, .projects, .content {
        padding: 5rem 3rem;
    }

    .contact__button {
        padding: 0.75rem 1.5rem;
    }

    /* images and icons */
    .about__tools-icon, .projects__icon {
        width: 2rem;
    }

    /* footer */
    .footer__content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer__socials {
        justify-content: center;
    }
}

@media screen and (max-width: 500px) {
    /* font sizes */
    .hero__title {
        font-size: 2rem;
    }

    .about__title, .projects__title, .contact__title {
        font-size: 2.5rem;
    }
}

@media screen and (max-width: 400px) {
    /* font sizes */
    .hero__title {
        font-size: 1.75rem;
    }

    .projects__name {
        font-size: 2.25rem;
    }

    /* layout adjustments */
    .projects__laptop-mockup {
        transform: scale(0.6);
    }

    .projects__phone-mockup {
        transform: scale(0.7);
    }
}
   