:root {
    --white: #dddddd;
    --red: #862a3d;
    --black: rgb(14, 14, 14, 1);
    --selection: rgba(255, 118, 118, 0.849);
}

#warning {
    background-color: yellow;
    position: absolute;
    z-index: 20;
    width: fit-content;
    height: fit-content;
    font-family: monospace;
    color: var(--black);
    font-size: .6rem;
    text-align: center;
    animation: fade-out 5s ease-out forwards;
}

html {
    margin: 0px;
    margin-top: clamp(-3rem, 2vw, -1rem);
    padding: 0px;
}

.cursor {
    position: relative;
    left: clamp(8.6rem, 39vw, 25rem);
    bottom: clamp(1.7rem, 7.9vw, 4.8rem);
    width: clamp(1rem , 5vw, 3rem);
    height: clamp(.1rem, 2vw, 1rem);
    background-color: var(--white);
    animation: 1s step-end blinking infinite;
    margin: 0px;
    padding: 0px;
    z-index: 1;
}

/* WORK PAGE STYLING */
.back {
    position: absolute;
    top: clamp(6rem, 2vw, 7.5rem);
    left: clamp(2.5rem, 2vw, 10rem);
    font-size: 3.5rem;
    color: var(--black);
    width: 3rem;
    border-radius: .2rem;
    aspect-ratio: 1;
    background-color: var(--white);
    cursor: pointer;
    opacity: 0;
    animation: .5s slideUp ease-out forwards;
}

.dyna-page {
    margin: 0;
    overflow: hidden;
}

.dyna-page h1 {
    margin-top: 3rem;
    display: flex;
    animation: .2s slideUp ease-in forwards;
}

footer {
    font-family: monospace;
    font-size: clamp(.5rem, 3vw, 1rem);
    font-weight: 200;
    text-align: left;
    width: max-content;
    position: absolute;
    word-break: normal;
}

h1 {
    font-family: 'Open Sans', sans-serif;
    font-size: clamp(1.4rem, 6.2vw, 4rem);
    font-weight: 600;
    width: max-content;
}

h2 {
    margin-top: 0;
    font-family: 'Ubuntu', sans-serif;
    font-weight: 200;
    font-size: clamp(1.4rem, 6vw, 4rem);
    word-break: normal;
}

.small-text {
    text-align: left;
    font-family: monospace;
    font-weight: 200;
    font-size: clamp(.7rem, 3.5vw, 1.5rem);
}

h3 {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 600;
    font-size: clamp(1.3rem, 5vw, 2.2rem);
    width: max-content;
}

.contacts {
    z-index: 2;
    position: fixed;
    left: -2.8rem;
    height: 15.4rem;
    display: flex;
    flex-direction: column;
    width: fit-content;
    justify-content: space-evenly;
    align-content: start;
    cursor: pointer;
}

canvas {
    max-height: calc(20rem + 10vw);
    /* max-height: clamp(20rem, 10vw, 40rem); */
    max-width: min-content;
    padding: clamp(.5rem, 2vw, 2rem);
}

.transition-screen {
    position: fixed;
    width: 100vw;
    height: fit-content;
    z-index: 10;
    background-color: var(--black);
    opacity: 1;
    visibility: hidden;
}

@media screen and (min-width: 1024px) {

    canvas {
        max-height: calc(8rem + 10vw);
    }

    footer {
        top: -1.4rem;
    }

    .container {
        padding-bottom: .5rem;
        height: auto;
        display: grid;
        grid-template-columns: 2.5fr .6fr 1fr;
        grid-template-rows: 1fr .2fr .3fr;
        gap: 0px 0px;
        grid-auto-flow: row;
        grid-template-areas:
            "Image Text Text"
            "Image Commissons Location"
            "Image Work Location";
    }

    #logo {
        width: calc(15rem + 25vw);
        animation: 5s ease-in-out hover infinite;
    }

    .Image {
        align-items: center;
        grid-area: Image;
        /* min-width: max-content; */
    }

    .Head {
        grid-area: Text;
        padding: 4rem;
        padding-left: 1rem;
        padding-right: 1rem;
        /* min-width: 40rem;
        min-height: 30rem; */
    }

    .Location {
        grid-area: Location;
        text-align: center;
    }

    .Commissons {
        background: var(--red);
        font-size: 2rem;
        grid-area: Commissons;
        min-width: 17rem;
        min-height: 5rem;
    }

    .Work {
        padding-left: 1rem;
        padding-bottom: 5rem;
        color: var(--black);
        font-size: 1rem;
        grid-area: Work;
        background-color: var(--white);
    }


    body {
        scale: .85;
        min-width: fit-content;
        background-color: var(--black);
        color: var(--white);
        overflow-x: hidden;
        margin: 0;
    }

}
/* goto mobile when width is less than 1023px */
@media screen and (max-width: 1023px) {

    html {
        margin: 0px;
    }

    footer {
        text-align: center;
        width: 100%;
        margin-top: 1rem;
    }

    .contacts {
        left: 0rem;
    }
    
    #logo {
        max-width: calc(15rem + 25%);
        animation: 5s ease-in-out hover infinite;
    }

    .container {
        padding-bottom: .5rem;
        max-height: auto;
        display: grid;
        grid-template-columns: 35% 20% 50%;
        
        grid-template-rows: 
        calc(20rem + 25vw) 
        0rem 
        calc(5rem + 25vw) 
        calc(3rem + 25vw) 
        calc(3rem + 15vw);

        gap: 0px 0px;
        grid-auto-flow: column;
        grid-template-areas:
            "Image Image Image"
            "Image Image Image"
            "Work Commissons Text"
            "Location Location Text"
            "Location Location Text";
    }

    .Image {
        align-items: center;
        grid-area: Image;
    }

    .Head {
        grid-area: Text;
        padding-top: .3rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .Location {
        grid-area: Location;
        text-align: center;
    }

    .Commissons {
        background: var(--red);
        grid-area: Commissons;
        writing-mode: vertical-rl;
        text-orientation: mixed;
    }

    .Work {
        padding-left: clamp(.3rem, 2.1vw, 2rem);
        color: var(--black);
        font-size: 2rem;
        grid-area: Work;
        background-color: var(--white);
    }

    body {
        /* overflow-y: hidden; */
        scale: .85;
        min-width: fit-content;
        background-color: var(--black);
        color: var(--white);
        overflow-x: hidden;
        margin: 0;
        margin-top: -3rem;
        margin-left: -4%;
    }

}

.Work ion-icon,
    .Commissons ion-icon {
        font-size: 1.5rem;
    }

.links {
    color: white;
    letter-spacing: .2rem;
    font-size: clamp(1rem, 4vw, 2rem);
    position: fixed;
    border: none;
    mix-blend-mode: difference;
}

.links ul {
    margin-top: -1rem;
    padding: .5rem 0;
}

ul {
    padding-left: 0rem;
    line-height: .7rem;
}

.contacts span a {
    color: var(--black);
    text-decoration: none;
}
.contacts div span i {
    font-size: .9rem;
}

.contacts div {
    padding: .4rem;
    padding-top: .25rem;
    display: flex;
    align-content: center;
    align-items: center;
    text-align: left;
    font-family: monospace;
    margin-top: -2rem;
    margin-bottom: .1rem;
    width: 2rem;
    height: 2rem;
    background-color: var(--white);
    transition: .25s ease-in;
    content-visibility: auto;
}

.contacts i {
    font-size: 1.5rem;
    color: var(--black);
}

.contacts div span {
    font-size: 1rem;
    padding-left: .5rem;
    display: inline-flex;
    width: 10rem;
    transition: .5s ease-in;
}

i {
    padding: .2rem;
}

/* HoverEffect */
.contacts div:hover span {
    color: var(--black);
    width: 10rem;
    transition: .5s ease-out;
}

.contacts div:hover {
    color: var(--black);
    width: 100%;
    transition: .5s ease-out;
}

.center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.outline {
    border: .1rem solid var(--white);
}

/* Selection color override */
.contacts div ::selection {
    color: var(--white);
    background-color: var(--black);
}

::selection {
    color: var(--black);
    background-color: var(--white);
}

img::selection {
    background-color: transparent;
}

a:visited,
a::after,
a:any-link {
    color: var(--white);
}

.Work ::selection {
    color: var(--white);
    background-color: var(--black);
}

.Commissons ::selection {
    color: var(--red);
    background-color: var(--black);

}


/* hover effect */
.hoverable:hover {

    background-color: var(--selection);
    cursor: pointer;
    transition: .4s;
}


/* Animations */
@keyframes fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}


@keyframes slideUp {
    from {
        transform: translateY(0rem);
        opacity: 0;
    }

    to {
        transform: translateY(-2rem);
        opacity: 1;

    }
}

@keyframes hover {
    0% {
        transform: translateY(1rem);
    }

    50% {
        transform: translateY(0rem);
    }

    100% {
        transform: translateY(1rem);
    }
}

@keyframes blinking {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}