* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #f5f1e8;
    --text-color: #1a2332;
    --text-secondary: #2d3748;
    --text-muted: #3a4556;
    --link-color: #1a4d7a;
    --border-color: rgba(26, 35, 50, 0.15);
    --card-bg: rgba(255, 255, 255, 0.4);
    --footer-text: #4A5164;
    --button-bg: #1a4d7a;
    --button-text: #f5f1e8;
}

/* Dark mode via data attribute */
:root[data-theme="dark"] {
    --bg-color: #1a2332;
    --text-color: #f5f1e8;
    --text-secondary: #e2dfd6;
    --text-muted: #d1cec5;
    --link-color: #7db3e8;
    --border-color: rgba(245, 241, 232, 0.2);
    --card-bg: rgba(0, 0, 0, 0.3);
    --footer-text: #ACB8C8;
    --button-bg: #7db3e8;
    --button-text: #1a2332;
}

/* System preference fallback */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-color: #1a2332;
        --text-color: #f5f1e8;
        --text-secondary: #e2dfd6;
        --text-muted: #d1cec5;
        --link-color: #7db3e8;
        --border-color: rgba(245, 241, 232, 0.2);
        --card-bg: rgba(0, 0, 0, 0.3);
        --footer-text: #ACB8C8;
        --button-bg: #7db3e8;
        --button-text: #1a2332;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--link-color);
    color: var(--bg-color);
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 600;
    z-index: 100;
}

.skip-link:focus {
    top: 10px;
    left: 10px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--bg-color);
    padding: 2rem 1.5rem;
}

.container {
    max-width: 720px;
    margin: 0 auto;
}

.lang-toggle {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

/* Theme toggle switch */
.theme-toggle-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.theme-toggle {
    position: relative;
    width: 60px;
    height: 30px;
    background-color: var(--text-muted);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    padding: 0;
    min-height: 30px;
    min-width: 60px;
}

.theme-toggle:hover {
    opacity: 0.8;
}

.theme-toggle:focus {
    outline: 3px solid var(--link-color);
    outline-offset: 3px;
}

.theme-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background-color: var(--bg-color);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

:root[data-theme="dark"] .theme-toggle::after {
    transform: translateX(30px);
}

.theme-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.lang-button {
    background: var(--button-bg);
    color: var(--button-text);
    border: 2px solid var(--button-bg);
    padding: 0.75rem 1.25rem;
    min-height: 44px;
    min-width: 44px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
}

.lang-button:hover {
    opacity: 0.8;
}

.lang-button:focus {
    outline: 3px solid var(--link-color);
    outline-offset: 3px;
}

.lang-content {
    display: none !important;
}

.lang-content.active {
    display: block !important;
}

header {
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

h1 {
    font-size: 2.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    font-weight: 400;
}

section {
    margin-bottom: 3rem;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    max-width: 65ch;
}

a {
    color: var(--link-color);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

a:hover {
    text-decoration-thickness: 2px;
    background-color: rgba(26, 77, 122, 0.1);
    padding: 2px 4px;
    margin: -2px -4px;
    border-radius: 3px;
}

:root[data-theme="dark"] a:hover {
    background-color: rgba(125, 179, 232, 0.15);
}

a:focus {
    outline: 3px solid var(--link-color);
    outline-offset: 3px;
    border-radius: 2px;
}

a[href^="http"]::after {
    content: " ↗";
    font-size: 0.85em;
    margin-left: 2px;
    text-decoration: none;
}

abbr {
    text-decoration: underline dotted;
    cursor: help;
}

.services {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 2rem;
}

.services ul {
    list-style: none;
    padding-left: 0;
}

.services li {
    padding-left: 1.25rem;
    position: relative;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.services li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--link-color);
}

.contact {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.contact-info {
    margin-top: 1rem;
}

.contact-item {
    margin-bottom: 0.75rem;
}

.label {
    font-weight: 600;
    color: var(--text-color);
}

.separator {
    margin: 0 0.5rem;
    color: var(--text-muted);
}

footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--footer-text);
}

.artistic-note {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.email-address {
    color: #6d3f26;
    font-weight: 600;
}

:root[data-theme="dark"] .email-address {
    color: #D4A574;
}

@media (max-width: 640px) {
    body {
        padding: 1.5rem 1rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
}