/* Setting variables in order to calculate sizes below */

:root {
    --containerwidth: 1200px;
    --footerheight: 80px;
    --navbarheight: 100px;
    --mobilemenuitemheight: 60px;
    --speed: .3s;
    --space: 20px;

    /* Navbar background color */
    --navbarcolor: #212121;

    /* Navbar font and button color */
    --navbaritemcolor: #c1cddb;

    --lightestcolor: #adb5be;
    --mainbody: #adb5be;

    /* Alternative bg color */
    --brcolor: #363636;

    --footercolor: #414141;

    --phonecolor: #e7ebf0;

    /* Table colours */
    --tablecolor: #829ca6;
    --thcolor: #c9d5de;
    --oddrowcolor: #e7edf0;
    --evenrowcolor: white;
    --bordercolor: #829ca6;
}

/* Mutual settings for the both, mobile and desktop layouts */

phone {
    display: flex;
    width: 100%;
    max-width: var(--containerwidth);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background-color: var(--phonecolor);
    padding: calc(var(--space) / 2) var(--space);
}

phone > span > a,
phone > span > a:hover,
phone > span > a:active,
phone > span > a:visited {
    color: #000000;
}

.profile_form {
    background-color: #616a6c;
    padding: var(--space);
}

.work-container {
    margin-bottom: var(--space);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.work {
    width: 100%;
    height: 0;
    padding-top: 60%;
    background-size: cover;
    background-position: right top;
    position: relative;
    border: 1px solid gray;
    overflow: hidden;
}

.work::before {
    content: "";
    position: absolute;
    top: 0; /* Adjust as needed to ensure the logo is cut off */
    right: 0; /* Adjust as needed */
    bottom: 0; /* Adjust as needed */
    left: 0; /* Adjust as needed */
    background: inherit; /* Inherit the background of the .work div */
    background-size: 113%; /* Make the background image slightly larger */
    background-position: right top;
    z-index: 0; /* Ensure it stays below the overlay link */
}


.work__link-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
}

.work__header {
    width: 100%;
    padding: calc(var(--space) / 2) 0;
    box-sizing: border-box;
}

.work__header a {
    font-weight: bold;
}

.work__header__title {
    font-size: large;
}

.work__header__title, .work__header__date {
    margin: 5px 0;
}

@media (max-width: 1024px) or (orientation: portrait) {
    phone {
        flex-direction: column;
        gap: 5px;
    }

    .work-container, .work, .work__header {
        width: 100%;
    }
    .work__header__title, .work__header__date {
        margin: 0 var(--space);
    }
    .work {
        border-left-style: none;
        border-right-style: none;
    }
}

@media (min-width: 1025px) and (orientation: landscape) {
    .works-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .work-container {
        width: calc(50% - var(--space)/2);
    }

    .work__header__title, .work__header__date {
        margin: 0;
    }
}
