:root {
    --bg: #1f1f1f;
    --bg2: #2a2a2a;
    --fg: #f5f5f5;
    --muted: #b0b0b0;
    --accent: #ff6b6b;
    --accent-hover: #ff5252;
    --ring: rgba(255, 107, 107, .35);
    --surface: rgba(255, 255, 255, .04);
    --border: rgba(255, 255, 255, .12);
}

* {
    box-sizing: border-box;
    margin: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Rubik', system-ui, -apple-system, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    font-weight: 400;
    color: var(--fg);
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg2) 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 8vh 7vw;
}

.wrap {
    max-width: 68ch;
    text-align: center;
}

.avatar-container {
    position: relative;
    width: 144px;
    height: 144px;
    margin: 0 auto 2rem;
    cursor: pointer;
    transition: transform .3s ease, box-shadow .3s ease;
    border-radius: 50%;
    border: 3px solid var(--surface);
    box-shadow: 0 0 0 1px var(--border),
        0 8px 32px rgba(0, 0, 0, .3),
        0 20px 60px rgba(0, 0, 0, .15);
}

.avatar-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px var(--border),
        0 12px 40px rgba(0, 0, 0, .35),
        0 24px 80px rgba(0, 0, 0, .2);
}

.avatar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    transition: opacity .5s ease;
    border: none;
}

.avatar-primary {
    opacity: 1;
    z-index: 2;
}

.avatar-secondary {
    opacity: 0;
    z-index: 1;
}

.avatar-container.switched .avatar-primary {
    opacity: 0;
}

.avatar-container.switched .avatar-secondary {
    opacity: 1;
}

@media (min-width: 720px) {
    .avatar-container {
        width: 168px;
        height: 168px;
    }
}

h1 {
    font-family: 'Junicode', serif;
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0 0 1.5rem;
    color: #f76f53;
}

.lead {
    font-size: clamp(1.2rem, 2.4vw, 1.6rem);
    font-weight: 300;
    color: var(--fg);
    opacity: .92;
    margin: 0 0 1rem;
    letter-spacing: -0.01em;
}

.subtle {
    color: var(--muted);
    font-weight: 400;
    font-size: .95rem;
    margin: 0 0 2.5rem;
    letter-spacing: .01em;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.actions a {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .8rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--fg);
    text-decoration: none;
    font-weight: 400;
    font-size: .95rem;
    letter-spacing: .005em;
    background: var(--surface);
    backdrop-filter: blur(10px);
    transition: all .25s ease;
    position: relative;
    overflow: hidden;
}

.actions a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    opacity: 0;
    transition: opacity .25s ease;
    z-index: -1;
}

.actions a:hover {
    transform: translateY(-2px);
    background: #d1cfc0;
    color: #1f1f1f;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .15),
        0 3px 10px rgba(0, 0, 0, .1);
}

.actions a:hover::before {
    opacity: .1;
}

a:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 3px;
    border-radius: 12px;
}

svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    transition: transform .25s ease;
}

.actions a:hover svg {
    transform: scale(1.1);
    color: #1f1f1f;
}

footer {
    margin-top: 3rem;
    font-size: .9rem;
    color: var(--muted);
    font-weight: 300;
    letter-spacing: .02em;
    opacity: .8;
}

@media (prefers-reduced-motion: reduce) {
    .actions a,
    .avatar-container,
    .avatar,
    svg,
    .reveal {
        transition: none !important;
        animation: none !important;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(12px);
        animation: elegantRise .6s cubic-bezier(.16, 1, .3, 1) forwards;
    }

    .reveal.slow {
        animation-duration: .8s;
        animation-delay: .1s;
    }

    .actions a {
        opacity: 0;
        transform: translateY(8px) scale(.95);
        animation: buttonRise .5s cubic-bezier(.16, 1, .3, 1) forwards;
    }

    .actions a:nth-child(1) {
        animation-delay: .2s;
    }

    .actions a:nth-child(2) {
        animation-delay: .3s;
    }

    .actions a:nth-child(3) {
        animation-delay: .4s;
    }

    @keyframes elegantRise {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes buttonRise {
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
}