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

:root {
    --fg: #333;
    --bg: #fff;
    --fg-dark: #e0e0e0;
    --bg-dark: #1a1a1a;

    --space: 1rem;
    --focus-ring: 2px;
    --transition-fast: 0.15s;
    --muted: 0.6;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--fg);
    background: var(--bg);
    max-width: 60ch;
    margin: 0 auto;
    padding: calc(var(--space) * 3) var(--space);
}

header {
    margin-bottom: calc(var(--space) * 2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    cursor: pointer;
}

button {
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
    color: inherit;
    padding: 0;
}

button:focus-visible {
    outline: var(--focus-ring) solid var(--fg);
    outline-offset: var(--focus-ring);
}

#theme-toggle {
    font-size: 1rem;
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

a:hover {
    text-decoration-thickness: 2px;
}

a:focus-visible {
    outline: var(--focus-ring) solid var(--fg);
    outline-offset: var(--focus-ring);
}

p {
    margin-bottom: var(--space);
}

main > :last-child {
    margin-bottom: 0;
}

@media (max-width: 480px) {
    body {
        padding: calc(var(--space) * 2) var(--space);
    }

    h1 {
        font-size: 1.25rem;
    }
}

@media (prefers-color-scheme: dark) {
    :root:not(:has(body.light)) {
        --fg: var(--fg-dark);
        --bg: var(--bg-dark);
    }
}

body.dark {
    --fg: var(--fg-dark);
    --bg: var(--bg-dark);
}

.email-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.2em;
}

#copy-email {
    font-size: 0.9em;
    opacity: var(--muted);
    margin-left: 0.2em;
    transition: opacity var(--transition-fast);
}

#copy-email:hover {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none;
    }
}
