/* issues */


/*Import Components*/
@import url('components/_reset.css');
@import url('components/_base.css');
@import url('components/_navigation.css');
@import url('components/_buttons.css');


/* Grid */
.main-grid {
    max-width: 1320px;
    width: 100%;
    margin: 64px auto;
    display: grid;
    grid-template-columns: calc(55% - 24px)  calc(45% - 24px);

    grid-template-areas:
      "nav     profile"
      "introduction profile"
      "portfolio story";

    /*grid-template-rows: repeat(14, 80px);*/
    grid-auto-rows: min-content;
    gap: 24px 48px ;
    justify-content: center;
}

#nav {
    grid-area: nav;
    grid-column: 1 / 2;
    grid-row: 1 span;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#introduction {
    grid-area: introduction;
    grid-row:  2 / 7;
    padding: 32px;
    background-image: url("../images/introduction-section-background.png");
    background-repeat: no-repeat;
    background-position: right;
    max-height: fit-content;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;


    .green-box {
        padding: 10px 12px;
        background-color: var(--greenBackground);
        display: flex;
        gap: 8px;
        justify-content: center;
        align-items: center;
        border-radius: 40px;
        margin-bottom: 16px;

        .small-circle {
            width: 10px;
            height: 10px;
            background-color: var(--greenText);
            border-radius: 100%;
        }

        .text {
            font-size: 16px;
            color: var(--greenText);

        }
    }

    h1 {
        margin-top: -12px ;
        font-size: 56px;
        font-weight: 300;
        color: var(--halfWhite);
    }

    p {
        margin-bottom: 32px;
    }
}

#portfolio {
    grid-area: portfolio;
    grid-row: 7 /  15 ;
    grid-column: 1 / 2;
    padding: 32px;
    background-image: url("../images/portfolio-section-background.png");
    background-repeat: no-repeat;
    background-position: right;

    display: flex;
    flex-direction: column;
    gap: 24px;

    .head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: var(--white);

        .heading {
            display: flex;
            gap: 8px;
            align-items: center;
            margin-left: -4px;
            .circle {
                background-color: var(--orange);
                width: 1rem;
                height: 1rem;
                border: .2rem solid var(--borderColor);
                border-radius: 100%;
            }

            .headline {
                font-size: 20px;
                font-weight: 300;
            }
        }

        .view-all {
            i {
                margin-left: 8px;
                transition: transform .4s ease-in-out , color .4s ease;
            }

            &:hover i {
                transform: translateX(8px) rotate(675deg);
                color: var(--orange);
            }
        }

    }

    .portfolios {
        direction: rtl;
        overflow: scroll;
        /*overflow-y: scroll;*/
        /*overflow-x: hidden ;*/
        display: flex;
        flex-direction: column;
        gap: 24px;
        height: 680px;

        /* scroll style */
        -webkit-overflow-scrolling: touch;

        &::-webkit-scrollbar {
            width: 8px;
        }

        &::-webkit-scrollbar-track {
            background: transparent;
            border-radius: 16px;
        }

        &::-webkit-scrollbar-thumb {
            background: var(--orange);
            border-radius: 16px;
        }

        .portfolio-card {
            /*height: 320px;*/
            min-height: 280px;
            width: 95%;
            position: relative;
            overflow: hidden;
            border-radius: 16px;
            transition: transform 0.3s ease;

            &:hover {
                transform: scale(1.03);
            }

            .portfolio-link {
                display: block;
                position: relative;
            }

            img {
                border-radius: 16px;
                width: 100%;
                display: block;
                transition: filter 0.3s ease;
            }

            .overlay {
                /* cover whole card */
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;

                /* dark transparent background */
                background: rgba(0, 0, 0, 0.6);

                /* center contents */
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;

                /* start hidden */
                opacity: 0;
                transition:
                        opacity 0.4s ease,
                        background-color 0.6s ease;
            }

            .overlay-title {
                color: #fff;
                font-size: 1.25rem;
                margin-bottom: 0.75rem;

                /* pop animation start */
                transform: translateY(-10px);
                opacity: 0;
                transition: transform 0.4s ease, opacity 0.4s ease;
            }

            .overlay-button {
                display: inline-block;
                padding: 0.6em 1.2em;
                border: 2px solid #fff;
                border-radius: 4px;
                color: #fff;
                font-size: 0.9rem;
                cursor: pointer;

                /* pop animation start */
                transform: translateY(10px);
                opacity: 0;
                transition:
                        transform 0.4s ease 0.1s,
                        opacity 0.4s ease 0.1s,
                        background-color 0.3s ease,
                        color 0.3s ease;
            }

            /* Hover state: fade in overlay + animate children */
            &:hover {
                img {
                    filter: brightness(80%);
                }

                .overlay {
                    opacity: 1;
                    background: rgba(0, 0, 0, 0.4);
                }

                .overlay-title {
                    transform: translateY(0);
                    opacity: 1;
                }

                .overlay-button {
                    display: inline-block;
                    padding: 0.6em 1.2em;
                    border: 2px solid #fff;
                    border-radius: 4px;
                    color: #fff;
                    font-size: 0.9rem;
                    cursor: pointer;

                    /* initial “pop” animation state */
                    transform: translateY(10px) scale(1);
                    opacity: 0;
                    transition:
                            transform 0.4s ease 0.1s,
                            opacity 0.4s ease 0.1s,
                            background-color 0.3s ease,
                            color 0.3s ease,
                            border-color 0.3s ease;

                    &:hover {
                        transform: translateY(0) scale(1.1);
                        background-color: var(--orange);
                        border-color: var(--orange);
                        color: #fff;
                    }
                }

                &:hover {
                    .overlay-button {
                        transform: translateY(0) scale(1);
                        opacity: 1;
                    }
                }
            }
        }
    }

}

#profile {
    grid-area: profile;
    grid-column: 2 / 3;
    grid-row:  1 / 8;

    padding: 12px;
    background-image: url("../images/profile-section-background.png");
    background-repeat: no-repeat;
    background-position: right ;
    background-position-y: 6vh ; 

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    .profile-image-container {
        text-align: left;
        margin-left: 40px;
        margin-top: 40px;
        margin-bottom: 80px;

        #profile-image  {
            
            background-repeat: no-repeat;
            background-size: cover;
            width: 180px;
            height: 180px;
            border-radius: 100%;
            border: 10px solid var(--borderColor);

        }
    }

    .profile-bottom-section {
        .contact-buttons {
            width: 100%;
            margin-bottom: 16px;
        }

        .follow-me {
            padding: 24px 16px;
            background-color: var(--borderColor);
            border-radius: 12px;
            margin-bottom: 16px;
        }

        .copy-right {
            background-color: var(--borderColor);
            padding: 20px 20px 16px 20px;
            display: flex;
            justify-content: center;
            align-items: center;
            border-radius: 12px;

            background-image: url("../images/copy-right-section-background.png");
            background-repeat: no-repeat;
            background-size: contain;
            background-position: bottom;
        }
        display: flex;
        flex-direction: column;
        gap: 0;
    }
}

#story {
    grid-area: story;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-image: url("../images/stories-section-background.png");
    background-repeat: no-repeat;
    background-position: right;
    position: relative;


    grid-column: 2 / 3;
    grid-row: 8 / 15;
    padding: 20px 40px 40px  16px;

    .vertical-line-top {
        position: absolute;
        width: 2px;
        height: 85%;
        left: 23px;
        top: 28px;
        background-color: var(--borderColor);
        z-index: 2;
    }

    .vertical-line-bottom {
        position: absolute;
        border-right: 1px dashed var(--borderColor) ;
        border-left: 1px dashed var(--borderColor) ;
        height: 20%;
        left: 23px;
        bottom: 28px;
        z-index: 1;
    }

    .head {
        z-index: 5;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: var(--white);

        .heading {
            display: flex;
            gap: 8px;
            align-items: center;
            .circle {
                background-color: var(--orange);
                width: 1rem;
                height: 1rem;
                border: .2rem solid var(--borderColor);
                border-radius: 100%;
            }

            .headline {
                font-size: 20px;
                font-weight: 300;
            }
        }
    }

    .stories-content-container {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-left: 20px;


        .view-all {
            color: var(--white);
            margin-top: 8px;
            margin-bottom: 12px;
            justify-self: end;
            font-size: 14px;

            i {
                margin-left: 8px;
                transition: transform .4s ease-in-out , color .4s ease;
            }

            &:hover i {
                transform: translateX(8px) rotate(675deg);
                color: var(--orange);
            }
        }
    }

    .stories-container {
        display: flex;
        flex-direction: column;
        gap: 32px;

        .story-card {
            margin-left: -4px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: var(--white);z-index: 5;

            .content {
                display: flex;
                gap: 12px;
                align-items: center;
            }

            img {
                z-index: 10;
                width: 30px;
                height: 30px;

                &:hover {
                    transform: scale(1.05);
                }

            }

            h3 {
                font-size: 14px;
                font-weight: 400;
                transition: color .3s ease;

                &:hover {
                    color: var(--orange);
                }
            }

            span {
                font-size: 12px;
                font-weight: 200;
                white-space: nowrap;

            }
        }
    }
}

@media screen and (max-width: 1280px) {
    .main-grid {
        margin: 40px auto;
        gap: 20px;
        padding: 20px 20px;
    }
}


@media screen and (max-width: 768px) {
    /*layout*/
    .main-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "nav"
            "introduction"
            "portfolio"
            "profile"
            "story";
        gap: 24px 0;
        margin: 20px auto;
        padding: 20px;
    }

    #nav,
    #introduction,
    #profile,
    #portfolio,
    #story {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        padding: 20px 16px;
    }

    #nav {
        order: 1;
        height: 80px;
    }

    #introduction {
        order: 2;
    }

    #profile {
        order: 3;

        .profile-image-container {
            padding: 0;
            margin: 20px;
        }
    }

    #portfolio {
        order: 4;

        .head {
            .heading {
                gap: 10px;

                .circle {
                    width: .8rem;
                    height: .8rem;
                }

                .headline {
                    font-size: 18px;
                }
            }

            .view-all {
                font-size: 14px;
            }
        }

        .portfolios {
            height: 380px;
            gap: 20px;

            .portfolio-card {
                min-height: fit-content;
                position: relative;
                overflow: hidden;
                border-radius: 12px;
                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
                transition: transform 0.3s ease;

                &:hover {
                    transform: translateY(-6px);
                }

                .portfolio-link {
                    display: block;
                    position: relative;
                    width: 100%;
                    height: fit-content;

                    img {
                        width: 100%;
                        display: block;
                        border-radius: 12px;
                        object-fit: cover;
                    }

                    .overlay {
                        position: absolute;
                        inset: 0;
                        background: rgba(0, 0, 0, 0.5);
                        opacity: 0;
                        display: flex;
                        flex-direction: column;
                        justify-content: center;
                        align-items: center;
                        color: #fff;
                        padding: 20px;
                        text-align: center;
                        transition: opacity 0.3s ease;

                        .overlay-title {
                            font-size: 20px;
                            margin-bottom: 10px;
                            font-weight: 600;
                        }

                        .overlay-button {
                            display: inline-block;
                            padding: 8px 16px;
                            border-radius: 6px;
                            font-size: 14px;
                            font-weight: 500;
                            transition: background 0.3s ease;
                        }
                    }

                    &:hover .overlay {
                        opacity: 1;
                    }
                }
            }
        }
        /* font size */

        .headline {
            font-size: 40px;
        }

        #introduction {
            h1 {
                font-size: 32px;
            }
        }
    }

    #story {
        order: 5;

        .head {
            .heading {
                .circle {
                    width: .8rem;
                    height: .8rem;
                }

                .headline {
                    font-size: 18px;
                }
            }
        }

        .stories-content-container {
            .heading-2 {
                font-size: 24px;
            }
        }
        
        .blog-title {
            a {
                font-size: 12px;
            }
        }
        .blog-date {
            font-size: 8px;
            white-space: nowrap;
        }
    }
}
