:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark; }

#theme-toggle .sun { display: none; }
#theme-toggle .moon { display: none; }

[data-theme="dark"]  #theme-toggle .sun  { display: block; }
[data-theme="light"] #theme-toggle .moon { display: block; }

html {
    height: 100%;
}

body {
    height: 100%;
    margin: 0;
    font-family: Helvetica, Arial, sans-serif;
    line-height: 1.4;
    background-color: light-dark(white, #1a1a1a);
    color: light-dark(black, #e8e8e8);
}

header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding-top: 0.5rem;
}

header .main {
    font-weight: bold;
    font-size: 2rem;
    margin-right: 1rem;
}

header a {
    text-decoration: none;
    color: canvastext;
}

header svg {
    height: 1rem;
    cursor: pointer;
}

main {
    flex-grow: 1; 
}

main li {
    margin-bottom: 0.5rem;
}

footer {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    margin-left: auto;
    margin-right: auto;
}

a:has(svg) {
  color: inherit;
}

footer svg {
    height: 1rem;
    width: auto;
}

nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

nav a:visited { 
    text-decoration: none;
}

nav a:hover { 
    text-decoration: underline;
}

nav a.active { 
    text-decoration: underline;
}

code {
    background-color: light-dark(whitesmoke, #2a2a2a);
    padding-left: 0.2rem;
    padding-right: 0.2rem;
}

pre {
    padding: 1rem;
    border: 1px solid light-dark(black, white);
    background-color: light-dark(whitesmoke, #2a2a2a);
    overflow: auto;
}

figure {
    text-align: center;
}

figure img {
    width: 100%;
    max-width: 500px;
    height: auto;
}

figure figcaption {
    font-style: italic;
    font-size: 0.9rem;
}

.content {
    height: 100%;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    padding-left: 1rem;
    padding-right: 1rem;
}

