@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&family=Geist+Mono:ital,wght@0,100..900;1,100..900&display=swap');

:root,
[data-theme="light"] {
    color-scheme: light;
    --bg-color: #F8F8F5;
    --text-color: #252620;
    --selection-bg: #F0DCCB;
    --selection-text: #252620;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg-color: #171815;
        --text-color: #F0F0EA;
        --selection-bg: rgba(96, 67, 51, 0.99);
        --selection-text: #F0F0EA;
    }
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg-color: #171815;
    --text-color: #F0F0EA;
    --selection-bg: rgba(96, 67, 51, 0.99);
    --selection-text: #F0F0EA;
}

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

::selection {
    background-color: #F0DCCB;
    color: #252620;
}

@media (prefers-color-scheme: dark) {
    ::selection {
        background-color: rgba(96, 67, 51, 0.99);
        color: #F0F0EA;
    }
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'EB Garamond', serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.hero {
    flex: 1;
    width: 100%;
    max-width: 540px;
    padding: clamp(24px, 5vh, 60px) clamp(16px, 4vw, 32px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-title {
    font-size: clamp(16px, 5.4vw, 30px);
    line-height: 1.25;
    font-weight: 400;
    font-style: italic;
}

.hero-title-line {
    display: block;
    white-space: nowrap;
}

.site-footer {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-top: 0;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 8px 12px;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: opacity 0.2s ease;
}

.theme-toggle:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 4px;
}

@media (hover: hover) {
    .theme-toggle:hover {
        opacity: 0.7;
    }
}

.theme-toggle-indicator {
    width: 5px;
    height: 5px;
    background-color: currentColor;
    transition: background-color 0.25s ease;
}

.theme-toggle-label {
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
}
