* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    font-family: Arial, sans-serif;
    overflow: hidden;
    background: #000;
}

/* ---------- enter screen ---------- */

#enter-screen {
    position: fixed;
    inset: 0;
    background: #000;
    color: white;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 2rem;
    cursor: pointer;
    z-index: 999;

    /* fade the splash out instead of snapping it away */
    opacity: 1;
    transition: opacity 0.6s ease;
}

#enter-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* ---------- background ---------- */

.bg {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    /* fills the screen at any aspect ratio, same as the old
       background-size: cover */
    object-fit: cover;

    z-index: 0;
    pointer-events: none;
}

/* ---------- main page ---------- */

#main-page {
    /* stays laid out so the background is already playing when the
       splash fades — that is what makes the reveal look smooth */
    position: relative;
    z-index: 1;

    display: flex;
    justify-content: center;
    align-items: center;

    width: 100%;
    height: 100%;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

#main-page.shown {
    opacity: 1;
    pointer-events: auto;
}

/* ---------- card ---------- */

.card {
    position: relative;

    width: 400px;
    max-width: calc(100vw - 32px);

    text-align: center;

    padding: 40px;

    color: white;

    border-radius: 20px;

    background: rgba(0,0,0,.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    /* rises into place a beat behind the background fade */
    transform: translateY(14px) scale(.98);
    opacity: 0;
    transition: transform 0.7s cubic-bezier(.2,.8,.2,1) 0.12s,
                opacity 0.7s ease 0.12s;
}

#main-page.shown .card {
    transform: none;
    opacity: 1;
}

.profile-pic {
    width: 140px;
    height: 140px;

    object-fit: cover;

    border-radius: 50%;

    margin-bottom: 15px;

    border: 4px solid white;
}

.bio {
    opacity: .8;
    margin-top: 8px;
}

.links {
    margin-top: 25px;

    display: flex;
    justify-content: center;
    align-items: center;

    gap: 16px;
}

.social {
    width: 55px;
    height: 55px;

    display: flex;
    justify-content: center;
    align-items: center;

    text-decoration: none;
    color: white;

    background: rgba(255,255,255,0.1);

    border-radius: 12px;

    transition: background 0.2s ease, transform 0.2s ease;
}

.social i {
    font-size: 1.6rem;
}

.social:hover {
    background: rgba(255,255,255,.2);
    transform: translateY(-2px);
}

/* ---------- view counter ---------- */

.views {
    position: absolute;
    left: 18px;
    bottom: 13px;

    font-size: .72rem;
    letter-spacing: .04em;
    text-transform: uppercase;

    opacity: .55;
    pointer-events: none;
}

.views[hidden] {
    display: none;
}

/* ---------- small screens ---------- */

@media (max-width: 440px) {
    .card {
        width: calc(100vw - 28px);
        padding: 28px 20px 44px;
    }

    .profile-pic {
        width: 112px;
        height: 112px;
    }

    #enter-screen {
        font-size: 1.4rem;
    }
}

/* ---------- respect reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    #enter-screen,
    #main-page,
    #main-page .card,
    .social {
        transition: none;
    }

    #main-page .card {
        transform: none;
        opacity: 1;
    }
}
