:root {
    --background-color: #738380;
    --primary-color: #f5f8fc;
    --accent-color: #232b26;
}

html {
    margin: 0;
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
}

body {
    margin: 0;
    height: 100vh; /* Fallback for older browsers */
    height: 100dvh;
    width: 100vw;
    overflow: hidden;
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Chivo Mono', sans-serif;
    color: var(--primary-color);
    background-color: var(--background-color);
    background-image: url(./background.jpg);
    background-size: cover;
    background-position-x: left;
    background-position-y: center;
}

.name {
    font-size: 1vw;
    line-height: 1;
    position: absolute;
    top: 20px;
    left: 20px;
}

.name-vertical {
    display: none;
}

.contact {
    font-size: 1.5vw;
    line-height: 1;
    position: absolute;
    bottom: 20px;
    left: 20px;
}

.contact-form {
    color: var(--primary-color);
    font-size: 2vw;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    visibility: hidden;
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1vh;
    transition: opacity 0.5s ease-out, visibility 0s linear 0.5s;
}

.contact-form.visible {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.5s ease-in, visibility 0s;
}

.circle {
    position: fixed;
    width: 12vw;
    height: 20vh;
    background-color: var(--background-color);
    border-radius: 50%;
    bottom: -20vh;
    left: -6vw;
    z-index: -1;
    transition: all 0.3s ease-in-out;
}

/* Hide circle hover effect on touch devices - media hover query not working so this is the backup */
.touch-device .circle:not(.expanded) {
    width: 0 !important;
    height: 0 !important;
}
body:not(.touch-device) .contact-text:hover {
    color: var(--accent-color);
}

.contact:hover .circle:not(.expanded) {
    bottom: -12vh;
    left: -2vw;
    width: 15vw;
    height: 25vh;
}

.circle.expanded {
    width: 400vw;
    height: 300vh;
    bottom: -150vh;
    left: -150vw;
    transition: all 0.5s ease-in;
    z-index: 5;
}

.contact-text {
    position: relative;
    z-index: 10;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.5s ease-in;
}
.contact-text.expanded {
    color: var(--accent-color);
}

.content {
    font-size: 5vw;
    font-weight: 600;
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    line-height: 1;
    flex-direction: column;
    align-items: flex-end;
}

.social {
    font-size: 3vw;
    font-weight: 600;
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

a {
    color: var(--primary-color);
    transition: color 0.2s ease-out;
}
a:hover {
    color: var(--accent-color);
}

@media (orientation: portrait) {
    .social {
        font-size: 5vw;
    }
    .content {
        font-size: 10vw;
        top: 15px;
    }
    .contact-form {
        font-size: 5vw;
    }
    .name-vertical {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        font-size: 5vw;
        position: absolute;
        top: 15px;
        left: 20px;
    }
    .contact {
        font-size: 5vw;
    }
    .name {
        display: none;
    }
    .contact:hover .circle:not(.expanded) {
        bottom: -12vh;
        left: -2vw;
        width: 40vw;
        height: 25vh;
    }
}

@media (orientation: portrait) and (max-aspect-ratio: 10 / 16) {
    body {
        background-position-x: 15%;
    }
}

@media (orientation: portrait) and (max-aspect-ratio: 8 / 16) {
    body {
        background-position-x: 19%;
    }
}