:root {
    --overlap: 10vw;
}
* {padding: 0; margin: 0; box-sizing: border-box;}
html {font-size: clamp(15px, 1.4vw, 30px);}
html, body {height: 100%;}
body {font-size: 1rem; line-height: 1.4; font-family: 'Poppins'; font-weight: 300; background: rgba(240,240,240) url(/img/bg.jpg) center center / cover no-repeat; color: black; background-attachment: fixed;}
#logo {position: absolute; top: 2.5rem; left: 3rem; width: 10rem; height: auto;}
#logo img {display: block; width: 100%;}
.h1 {position: absolute; bottom: 3rem; right: 3.5rem; font-size: clamp(1.5rem, 9vw, 3rem); font-weight: 500; line-height: 1.8;}

/* create close button with before and after */
article > a.close {
    position: absolute;
    top: 2.25rem;
    right: 2.75rem;
    width: 3rem;
    height: 3rem;
    border: 0;
    margin: 0;
    background: transparent;
}
article > a.close::after, article > a.close::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 0.1rem;
    background-color: black;
    margin-top: 1.45rem;
}
article > a.close::before {
    transform: rotate(45deg);
}
article > a.close::after {
    transform: rotate(-45deg);
}

/* style article as a full screen overlay */
article {
    position: fixed; 
    background-color: rgba(255,255,255,0.5);
    backdrop-filter: blur(0.35rem);
    padding: 3rem 3rem 3.5rem;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
}
article .pretitle {
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 1.25rem;
}
article h1 {
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    max-width: 24em;
}
article p a {
    border: 1px solid black; 
    padding: 1rem 1.25rem; 
    text-decoration: none; 
    font-weight: 600;
    margin-top: 1rem;
    display: inline-block;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    color: black; 
    background-color: transparent
}
.link {
    position: absolute;
    bottom: 4.35rem;
    left: 3.5rem;
    color: black;
    text-decoration: underline;
    white-space: nowrap;
    font-weight: 600;
    text-underline-offset: 0.3em;
    text-decoration-thickness: 0.1rem;
}
body:has(article) #logo {
    position: fixed;
    z-index: 2;
}

/* create blinking cursor effect */
.h1::after {
    content: '';
    display: inline-block;
    vertical-align: middle;
    width: 0.035em;
    height: 1.25em;
    background-color: black;
    margin-left: 0.2em;
    animation: blink 1s steps(2, start) infinite;
    position: relative;
    bottom: 0.1em;
}
@keyframes blink {
    to {
        visibility: hidden;
    }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    #logo {left: 2rem; top: 2rem;}
    article {padding-inline: 2rem;}
    article > a.close {top: 1.75rem; right: 1.75rem;}
    .h1 {right: 2.5rem; bottom: 2rem;}
    body {background-size: 143% auto;}
    body::before, body::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: calc(50vh - 50vw + var(--overlap));
        mask-image: linear-gradient(rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) calc(100% - var(--overlap)), rgba(0, 0, 0, 0) 100%);
        background: url(/img/bg.jpg) center top / auto 130vh no-repeat;
        z-index: -1;
    }
    body::before {
        bottom: 0;
        top: auto;
        background: url(/img/bg.jpg) center bottom / auto 130vh no-repeat;
        mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) var(--overlap), rgba(0, 0, 0, 1) 100%);
    }
    body::after {
        backdrop-filter: blur(5rem);
    }
    .link {bottom: auto; left: 2rem; top: 8rem; }
}