
:root {
    --bg-color: #ffffff;
    --text-color: #222222;
    --primary-color: #1e90ff;
    --accent-color: #ffb703;
    --link-hover: #f0c302;
    --focus-outline: rgba(30,144,255,0.9);
}

/* Box sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Base */
body {
    font-family: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header / footer / nav */
header, footer {
    padding: 0.75rem 1rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

h1 {
    margin-right: 25px;
}
nav a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 10px;
}

/* hover uses variable for consistency */
nav a:hover,
nav a:active {
    color: var(--link-hover);
}

/* Links and focus */
a {
    color: var(--accent-color);
    text-decoration: none;
}

a:focus-visible {
    outline: 3px solid var(--focus-outline);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Main layout */
main {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
    text-align: center;
}

section {
    margin: 0.5rem;
    padding: 0.3rem;
}

/* Profile image */
figure.profile {
    text-align: center;
    margin: 1rem auto;
    max-width: 250px;
}

figure.profile img {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 50%;
    display: block;
    margin: 0 auto;
}

figure.profile figcaption {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 600px) {
    main {
         padding: 0.5rem;
    }
    nav a {
        display: block;
        margin: 10px 0;
    }
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Dark theme variables */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --text-color: #f5f5f5;
        --primary-color: #64b5f6;
        --accent-color: #ffcc80;
        --link-hover: #ffcc02;
        --focus-outline: rgba(100,181,246,0.9);
    }
}
