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

:root {
    --bg-color:  #222323;
    --text-color:  #f0f6f0;
    --border-color:  #f0f6f0;
}

:root.light-mode {
    --bg-color:  #f0f6f0;
    --text-color:  #222323;
    --border-color:  #222323;
}

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    min-width: 44px;
    min-height: 44px;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s ease;
    margin-top: 1rem;
}

.theme-toggle:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}

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

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.title {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 400;
    max-width: 40ch;
    line-height: 1.8;
}

.social {
    margin-top: 2rem;
}

.social a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    display: inline-block;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.social a:hover {
    border-bottom-color: var(--text-color);
    font-weight: 700;
}

.social a:focus-visible {
    outline: 2px solid var(--text-color);
    outline-offset: 4px;
    border-radius: 2px;
}

footer {
    padding: 2rem;
    text-align: center;
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    main {
        padding: 1rem;
    }

    h1 {
        margin-bottom: 1rem;
    }

    footer {
        padding: 1.5rem 1rem;
    }
}
