
:root {
    color-scheme: light dark;
    
    /* light theme */
    --bg: #f5efeb;
    --text: #2b2b2b;
    --accent: #e67e22;
    --border: #e0d8cf;
}

/* dark theme */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #202023;
        --text: #f4f1ec;
        --accent: #f07b3f;
        --border: #3c3836;
    }
}

/* basic styles */
* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 17px;
    font-weight: 450;
    line-height: 1.65;
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 1.2rem;
    background: var(--bg);
    color: var(--text);
    transition: background-color 0.2s ease, color 0.2s ease;
}

a { 
    color: var(--accent); 
    text-decoration: none;
    font-weight: 500;
}
a:hover { text-decoration: underline; }

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem auto;
    display: block;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

h1, h2, h3 { 
    line-height: 1.3; 
    font-weight: 600;
    letter-spacing: -0.01em;
}
h1 { 
    font-size: 2.3rem; 
    margin-bottom: 1.5rem;
}
h2 { 
    font-size: 1.7rem; 
    margin-top: 2.2rem; 
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
}

header {
    padding-bottom: 1.2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--text);
    opacity: 0.8;
    font-size: 0.9rem;
}

/* theme toggle */
#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    font-size: 1.3rem;
    padding: 0.3rem;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

#theme-toggle:hover {
    transform: rotate(15deg);
}

.dark {
    --bg: #202023;
    --text: #f4f1ec;
    --accent: #f07b3f;
    --border: #3c3836;
}

.light {
    --bg: #f5efeb;
    --text: #2b2b2b;
    --accent: #e67e22;
    --border: #e0d8cf;
}
