:root {
    color-scheme: light dark;

    --bg: #f5f5f5;
    --fg: #222222;
    --muted: #777777;
    --icon: #555555;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1f1f1f;
        --fg: #f5f5f5;
        --muted: #9a9a9a;
        --icon: #dddddd;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    background: var(--bg);
    color: var(--fg);

    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 100vh;
    padding: 2rem;
}

main {
    text-align: center;
}

.avatar {
    width: 160px;
    height: 160px;

    margin: 0 auto 2rem;

    display: block;

    border-radius: 50%;
    object-fit: cover;
}

h1 {
    margin: 0 0 0.75rem;

    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 500;

    letter-spacing: -0.03em;
}

.tagline {
    margin: 0 0 1.75rem;

    color: var(--muted);
    font-size: 1rem;
}

.tagline:empty {
    display: none;
}

nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
}

nav a {
    color: var(--icon);

    text-decoration: none;

    transition:
        opacity .2s ease,
        transform .2s ease;
}

nav a:hover,
nav a:focus-visible {
    opacity: .7;
    transform: translateY(-2px);
}

nav svg {
    width: 30px;
    height: 30px;

    fill: currentColor;

    flex-shrink: 0;
}

.email-link {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.email-text {
    max-width: 0;
    opacity: 0;

    overflow: hidden;
    white-space: nowrap;

    margin-left: 0;

    transition:
        max-width .3s ease,
        opacity .2s ease,
        margin-left .3s ease;
}

.email-link:hover .email-text,
.email-link:focus .email-text,
.email-link:focus-visible .email-text {
    max-width: 240px;
    opacity: 1;
    margin-left: .75rem;
}

footer {
    margin-top: 3rem;

    color: var(--muted);
    font-size: .9rem;
}

@media (max-width: 480px) {

    body {
        padding: 1.5rem;
    }

    .avatar {
        width: 140px;
        height: 140px;
    }

    nav {
        gap: 1.25rem;
    }

    nav svg {
        width: 28px;
        height: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {

    nav a,
    .email-text {
        transition: none;
    }
}