:root {
    color-scheme: light dark;

    /* Light mode */
    --background: #FFFFFF;
    --text-primary: #333333;
    --text-secondary: #4B5563;
    --text-muted: #6B7280;
    --link: #5877B8;
    --link-hover: #3F5F9E;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #333333;
        --text-primary: #F5F5F5;
        --text-secondary: #D4D4D4;
        --text-muted: #A3A3A3;
        --link: #6B8FD6;
        --link-hover: #87A8F5;
    }
}

[data-theme="light"] {
    --background: #FFFFFF;
    --text-primary: #333333;
    --text-secondary: #4B5563;
    --text-muted: #6B7280;
    --link: #5877B8;
    --link-hover: #3F5F9E;
}

[data-theme="dark"] {
    --background: #333333;
    --text-primary: #F5F5F5;
    --text-secondary: #D4D4D4;
    --text-muted: #A3A3A3;
    --link: #6B8FD6;
    --link-hover: #87A8F5;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;

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

    padding:
        30px 32px 40px;

    background: var(--background);
    color: var(--text-primary);

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

    /* transition:
        background .25s ease,
        color .25s ease; */
    transition:
        background-color .35s ease,
        color .35s ease;
}

main {
    width: min(76%, 640px);
    text-align: center;
}

.logo {
    width: 300px;
    max-width: 80%;
    margin-bottom: 20px;
}

h1 {
    margin: 0;

    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.role {
    margin-top: 12px;

    color: var(--text-secondary);
    font-size: 1.25rem;
}

.description {
    margin: 28px auto 0;

    max-width: 560px;

    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

.links {
    margin-top: 36px;

    display: flex;
    justify-content: center;
    gap: 24px;
}

.links a {
    color: var(--link);

    text-decoration: none;
    font-weight: 500;

    transition:
        color .25s ease;
}

.links a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.theme-toggle {
    position: fixed;

    top: 24px;
    right: 24px;

    width: 44px;
    height: 44px;

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

    border: none;
    border-radius: 50%;

    background: transparent;

    color: var(--text-secondary);

    cursor: pointer;

    transition:
        background-color .2s ease,
        color .2s ease,
        transform .15s ease;
}

.theme-toggle:hover {
    color: var(--text-primary);
    background: rgba(128,128,128,.15);
    transform: scale(1.05);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 3px;
}

.theme-icon {
    position: relative;

    width: 22px;
    height: 22px;
}

.theme-icon img {
    position: absolute;
    inset: 0;

    width: 22px;
    height: 22px;

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;

    transition:
        opacity .25s ease,
        transform .35s ease;
}

[data-theme="light"] .moon-icon {
    opacity: 1;
    transform:
        rotate(0deg)
        scale(1);
}

[data-theme="light"] .sun-icon {
    opacity: 0;
    transform:
        rotate(-90deg)
        scale(.6);
}

[data-theme="dark"] .sun-icon {
    opacity: 1;
    transform:
        rotate(0deg)
        scale(1);
}

[data-theme="dark"] .moon-icon {
    opacity: 0;
    transform:
        rotate(90deg)
        scale(.6);
}

@media (max-width: 480px) {
    body {
        padding:
            30px 24px 32px;
    }

    .logo {
        width: 220px;
        margin-bottom: 36px;
    }

    .description {
        font-size: 0.95rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .theme-icon svg,
    .theme-toggle {
        transition: none;
    }

    body {
        transition: none;
    }
}