﻿
:root {
    --width-article: 700px;
}

.project {
    margin-left: auto;
    margin-right: auto;

    & div.header {
        position: relative;
        background-color: var(--color-dark-blue);
        background-image: url(../content/common/default-header.png);
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;

        min-height: 250px;
        min-width: 100%;
        padding: 2rem 1rem;
        padding-bottom: calc(1rem + 5px);

        display: grid; 
        align-content: center;
        align-items: center;
        padding: 1rem;

        margin-bottom: 10px;

        &::before {
            content: '';
            position: absolute;
            top: 0px;
            bottom: 0px;
            left: 0px;
            right: 0px;
            background-color: var(--color-dark-blue);
            opacity: .5;
            z-index: 0;
        }

        & div.titles {
            position: relative;
            z-index: 5;

            & span {
                display: block;
                text-align: center;
                color: var(--color-whitish);

                &.title {
                    font-family: var(--fonts-serif);
                    font-size: 2rem;
                    font-weight: bold;
                    text-transform: capitalize;
                    text-shadow: 0px 0px 5px #000000;
                }
            }
        }

        &::after {
            content: '';
            background-color: var(--color-whitish);
            position: absolute;
            bottom: -5px;
            width: 75vw;
            left: 50%;
            transform: translateX(-50%);
            height: 10px;
        }
    }

    & div.content {
        position: relative;
        min-height: 5rem;

        & div.personnel {
            border: solid 1px var(--color-dark-blue);
            background-color: var(--color-whitish);
            margin-top: 2rem;
            border-radius: 5px;
            padding: 3px;
            box-shadow: var(--box-shadow-image);

            & div.title {
                text-transform: uppercase;
                padding-bottom: .5rem;
                margin-bottom: .5rem;
                border-bottom: solid 1px var(--color-dark-blue);
                text-align: center;
                font-weight: bold;
            }

            & div.host {
                background-color: var(--color-whitish);
                color: var(--color-dark-blue);
                border-radius: 3px;
                padding: 1rem;
            }

            & div.list {
                display: grid;
                grid-auto-flow: row;
                gap: 1rem;

                & div[data-part=person] {
                    & div[data-part=name] {
                        font-weight: bold;
                    }

                    & div[data-part=role] {
                        font-style: italic;
                        font-size: 0.9rem;
                        margin-bottom: 0.25rem;
                    }

                    & div[data-part=department] {
                        padding-left: 1rem;
                    }

                    & div[data-part=institution] {
                        font-style: italic;
                        font-size: 0.9rem;
                        margin-top: 0.25rem;
                        padding-left: 1rem;
                    }
                }
            }
        }

        & div.content {
            /* MAIN CMS CONTENT*/
            padding: 3rem;
            font-family: var(--fonts-sans-serif);
            width: min(100%, var(--width-article));
            margin-left: auto;
            margin-right: auto;
            position: relative;

            & div[data-part=project-info] {
                & * {
                    font-size: 1.1rem;
                    color: var(--color-dark-blue);
                }

                & div[data-part=name] {
                    font-weight: bold;
                    margin-bottom: .5rem;
                    font-size: 1.2rem;
                }
            }

            & div[data-part=text-blocks] {
                & div:empty { 
                    display: none;
                }

                & div[text] {
                    margin-top: 2rem;
                    display: block;

                    &::before {
                            display: block;
                            font-size: 1.2rem;
                            font-weight: bold;
                            color: var(--color-dark-blue);
                            margin-bottom: 1rem;
                            padding-bottom: 0.5rem;
                            border-bottom: solid 2px var(--color-dark-blue);
                            background: linear-gradient(0deg, var(--color-whitish) 0%, rgba(255,255,255,1) 20%);
                    }

                    &[text=objective] {
                        &::before {
                            content: "Objective";
                        }
                    }

                    &[text=methods] {
                        &::before {
                            content: "Methods";
                        }
                    }

                    &[text=rationale] {
                        &::before {
                            content: "Rationale";
                        }
                    }

                    &[text=blurb] {
                        &::before {
                            content: "Summary or Results";
                        }
                    }
                }
            }
        }

        & div.publications {
            & div.title {
                font-weight: bold;
                font-size: 1.1rem;
                padding: 1rem;
                text-align: center;
                background-color: var(--color-whitish);
                text-transform: uppercase;
            }

            & div.host {
                padding: 2rem;
                gap: 1rem;                

                & div.publication {
                    padding-block: 1rem;
                    margin-bottom: 5px;
                    border-bottom: solid 1px var(--color-links);

                    &:last-child {
                        border-bottom: none;
                    }

                    & div[data-part=title] {
                        color: var(--color-dark-blue);
                        font-size: 1.1rem;
                        font-weight: bold;
                        margin-bottom: .5rem;
                    }

                    & div[data-part=book] {
                        font-weight: bold;
                    }

                    & div[data-part=journal] {
                        & span.name {
                            font-weight: bold;
                        }
                    }

                    & div[data-part=authors] {
                        font-size: .9rem;
                        margin-top: .5rem;

                        &:empty {
                            display: none;
                        }

                        &::before {
                            content: "Author(s): ";
                            font-weight: bold;
                        }
                    }

                    & div[data-part=year] {
                        margin-top: .5rem;
                        display: inline-block;
                    }

                    & div[data-part=pages] {
                        margin-top: .5rem;
                        display: inline-block;

                        &:empty {
                            display: none;
                        }

                        &::before {
                            content: " - pages "
                        }
                    }
                }
            }
        }
    }
}

@media(min-width: 700px) {
    .project {
        & div.publications {
            & div.host {
                width: var(--width-article) !important;
                margin-left: auto;
                margin-right: auto;
                display: block !important;
            }
        }
    }
}

@media(min-width: 1250px) {
    .project {
        & div.content {
            & div.content {
                & div.personnel {
                    position: absolute;
                    width: 40%;
                    top: 3rem;
                    right: calc(-40% + 1rem);
                    margin-left: 1rem;

                    margin-top: 0rem;
                }
            }
        }
    }
}