:root.light {
    --bg: #fbeed9;
    --fg: #1b1a18;
    --hover: #5c5c5c;
}

:root.dark {
    --bg: #1b1a18;
    --fg: #e6e6e6;
    --hover: #9b9a99;
}

body {
    background-color: var(--bg);
    color: var(--fg);

    margin: 0 auto; /* center */
    max-width: 65ch;
    padding: 0 2ch; /* so text doesn't touch the edges on small screens */

    font-family: system-ui, sans-serif;
}

/*
 * Nav bar
 */

nav {
    display: flex;
    margin-top: 2ch;
}

nav a {
    font-variant-caps: small-caps;

    color: inherit;
    text-decoration: none;
}

nav a:hover {
    color: var(--hover);
}

.nav-right {
    margin-left: auto;

    display: flex;
    gap: 1ch;
}

/*
 * Theme switcher
 */

/* remove the default button styling */
.theme-btn {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.theme-btn.dark {
    display: none;
}

.dark .theme-btn.dark {
    display: none;
}

.light .theme-btn.dark {
    display: inline;
}

.light .theme-btn.light {
    display: none;
}
.dark .theme-btn.light {
    display: inline;
}

.dark .theme-btn.light img {
    filter: invert(1);
}

.theme-icon {
    height: 1em;
    width: auto;
}

/*
 * Content
 */

main {
    margin: 3ch 0;
}

/*
 * Footer
 */

footer {
    display: flex;
}

.footer-right {
    margin-left: auto;

    display: flex;
    gap: 1ch;
}
