/* General */

.p-meta {
    display: flex;
    justify-content: space-evenly;
    font-size: .8rem;
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);

    & .header {
        color: var(--accent-gold-soft);
        text-decoration: underline;
        padding: 0;
        margin: 0;
    }

    & .diff {
        width: 20%;
        display: flex;
        align-items: start;
        justify-content: space-evenly;
        flex-direction: column;

        & .wrapper {
            display: flex;
            width: 100%;
            justify-content: space-between;
            align-items: center;
        }

        & ._rating {
            border: 1px solid var(--border);
            padding: .5rem;
            border-radius: 50%;
        }

        & .beginner {
            background: green;
        }

        & .intermediate {
            background: yellow;
        }

        & .professional {
            background: red;
        }
    }

    & .duration, .tech {
        display: flex;
        flex-direction: column;
    }
}

.module-wrapper {
    & h4 {
        color: var(--accent-gold);

        & a {
            color: var(--accent-gold);
        }
    }

    & .dev {
        color: var(--accent-gold-soft);
    }

    & .desc-dev {
        color: var(--text-muted);
    }

    & .m-det {
        display: flex;
        flex-direction: column;
        margin: 1rem 0;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border);
    }
}


/* Index */
.projects {
    display: flex;
    flex-direction: column;

    & .projects-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 3rem;

        & h2 {
            font-size: 3rem;
            color: var(--accent-gold);
        }

        & p {
            max-width: 75%;
        }
    }

    & .expl {
        width: 100%;
        display: flex;
        flex-direction: column;

        & h3, h4 {
            color: var(--accent-gold-soft);
        }

        & .intro {
            width: 100% ;
            display: flex;
            justify-content: space-evenly;
            border-bottom: 1px solid var(--border);
            margin: 3rem 0;
            padding: 2rem 0;

            & .text {
                width: 60%;
                text-align: start;
                display: flex;
                flex-direction: column;
            }

            & .lst {
                width: 39%;
                display: flex;
                flex-direction: column;
                text-align: start;

                & p {
                    padding: 0;
                    margin: 0;
                }
            }
        }

        & .label-expl {
            width: 100% ;
            display: flex;
            flex-direction: column;
            text-align: start;
            margin: 3rem 0;
            padding: 2rem 0;
            border-bottom: 1px solid var(--border);

            & .wrapper {
                width: 100%;
                display: flex;
                justify-content: space-evenly;
            }
        }
    }

    & .main-projects {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        column-gap: 2rem;
        row-gap: 5rem;
        margin: 2rem 0;
        padding: 2rem;

        & .project-card {
            display: flex;
            flex-direction: column;
            position: relative;
            border-radius: 16px;

            background: var(--bg-elevated);

            border: 1px solid rgba(255,255,255,.06);

            box-shadow:
                inset 0 1px 0 rgba(255,255,255,.04),
                inset 0 -1px 0 rgba(0,0,0,.35),
                0 6px 18px rgba(0,0,0,.35),
                0 24px 48px rgba(0,0,0,.45);
            transition: .25s ease;

            & >* {
                padding: 3rem;
            }

            & .date-container {
                padding: 0;
                padding-right: 1rem;
                margin: 0;
                width: 100%;
                display: flex;
                flex-direction: column;
                font-size: .6rem;
                align-items: end;

                & p {
                    padding: 0;
                    margin: 0;
                    padding: .2rem;
                }
            }
            

            & .p-det {
                display: flex;
                flex-direction: column;
                border-bottom: 1px solid var(--accent-blue);

                & h3 {
                    & a {
                        color: var(--accent-gold);
                        font-size: 2rem;
                    }
                }

                & .desc {
                    color: var(--text-muted);
                    font-style: italic;
                    font-size: 1.2rem;
            
                }

                & .links {
                    display: flex;
                    justify-content: space-between;

                    & a {
                        color: var(--accent-gold);
                    }
                }

                & .note {
                    & a {
                        color: var(--accent-gold);
                    }
                }
            }
        }

        & .project-card:hover {
            transform: translateY(-5px);
            box-shadow:
                inset 0 1px 0 rgba(255,255,255,.05),
                0 12px 24px rgba(0,0,0,.4),
                0 36px 70px rgba(0,0,0,.55);
        }

        & .project-card::before {
            content: "";
            position: absolute;
            inset: 0;
            border-radius: inherit;
            background:
            linear-gradient(
                to bottom,
                rgba(255,255,255,.05),
                transparent 18%
            );
            pointer-events: none;
        }
    }
}


/* Project Detail */
.project {
    width: 100%;
    display: flex;
    flex-direction: column;

    & header {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 5rem 2rem;
        margin-bottom: 2rem;

        & a {
            color: var(--accent-gold);
        }

        & h2 {
            color: var(--accent-gold);
            font-size: 2.5rem;
        }
    }

    & .main-project {
        display: flex;
        justify-content: space-between;
        margin-bottom: 2rem;
        padding-bottom: 2rem;

        & .p-meta {
            margin: 0;
            margin-bottom: 3rem;
        }

        & .links {
            display: flex;
            justify-content: space-between;

            & a {
                color: var(--accent-gold);
            }
        }

        & .pr {
            width: 48%;
            display: flex;
            flex-direction: column;
            padding-right: 2rem;
            border-right: 1px solid var(--border);
        }

        & .module-wrapper {
            width: 46%;
        }


    }
}


/* Module Detail */
.module {
    max-width: 100%;
    display: flex;
    flex-direction: column;

    & header {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0 2rem;
        padding-top: 5rem;
        margin-bottom: 2rem;
        border-bottom: 1px solid var(--border);

        & a {
            color: var(--accent-gold);
            font-size: 2.2rem;
        }

        & h3 {
            color: var(--accent-gold);
            font-size: 2rem;
        }

        & .links {
            width: 100%;
            display: flex;
            justify-content: start;
            margin-top: 5rem;
            align-items: center;
            border-top: 1px solid var(--border);
            padding: 3rem 0;

            & a {
                margin: 0 2rem;
                font-size: .9rem;

            }
        }
    }

    & .main-module {
        width: 100%;

        & pre {
            max-width: 100%;
            white-space: pre-wrap;
        }

        & a {
            color: var(--accent-gold-soft);
        }

        & blockquote {
            color: var(--accent-gold-soft);
            padding: 2rem 0;
            font-size: 1.2rem;
        }

        h3 {
            font-size: 1.5rem;
            color: var(--accent-gold);
            margin-top: 10rem;
        }

        & h4 {
            font-size: 1.3rem;
            margin-top: 3rem;
            color: var(--accent-gold-soft);
        }

        & h5 {
            font-size: 1rem;
            color: var(--accent-blue);
        }

        & h6 {
            text-decoration: underline;
            font-size: 1.1rem;
            color: var(--accent-gold);
        }

        & .production-note {
            padding: 2rem 0;
        }

        & img {
            max-width: 100%;
            height: auto;
            margin: auto;
            margin-bottom: 3rem;
        }
    }

    & .module-navigation {
        width: 100%;
        display: flex;
        justify-content: space-evenly;
        align-items: center;
        margin: 5rem 0;
        padding: 5rem;
        border-top: 1px solid var(--border);

        & .nav-wrapper {
            width: 40%;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            justify-content: space-between;

            & .title {
                color: var(--accent-gold-soft);
                font-size: 1.2rem;
            }

            & .link {
                color: var(--accent-gold);
                font-size: 1.5rem;
            }

            & .none {
                color: var(--text-muted);
            }
        }
    }
}


@media screen and (max-width: 1200px) {
    .projects {
        & .main-projects {
            grid-template-columns: repeat(1, 1fr);
            padding: 1rem;
        }
    }

}


@media screen and (max-width: 900px) {
    .p-meta {
        flex-direction: column;

        & > * {
            margin-bottom: 1rem;
        }
    }

    .projects {
        & .main-projects {
            grid-template-columns: repeat(1, 1fr);
            padding: 1rem;
        }

        & .projects-header {
            padding: 3rem 1rem;

            & p {
                max-width: 90%;
            }
        }

        & .expl {
            & .intro {
                flex-direction: column;

                & .text {
                    width: 100%;
                }

                & .lst {
                    width: 100%;
                }
            }

            & .label-expl {
                & .wrapper {
                    flex-direction: column;
                }
            }
        }

        & .main-projects {
            & .project-card {
                & .p-det {
                    padding: 1rem;
                }

                & .module-wrapper {
                    padding: 1rem;
                }
            }
        }
    }

    .project {
        & .main-project {
            flex-direction: column;

            & .pr {
                width: 100%;
                padding-right: 0;
                padding-bottom: 2rem;
                border-right: none;
                border-bottom: 1px solid var(--border);
            }

            & .module-wrapper {
                width: 100%;
            }
        }
    }

    .module {
        & header {
            padding: 5rem 1rem;
            text-align: center;
        }

        & .main-module {
            width: 100%;
            overflow-wrap: anywhere;
            word-break: break-word;
        }

        & .module-navigation {
            padding: 5rem 1rem;
            flex-direction: column;
            align-items: center;

            & .nav-wrapper {
                width: 100%;

                & .title {
                    font-size: 1rem;
                }
            }
        }
    }
}