:root, .theme-light {
    --x: 0.5rem;
    --wrap: 37rem;  

    --color-base-00: #FFF8E7;
    --color-base-10: #E5DFD0;
    --color-base-20: #CCC6B9;
    --color-base-30: #B2AEA2;  
    --color-base-40: #99958B;
    --color-base-50: #807C74;
    --color-base-60: #66635C;
    --color-base-70: #4D4A45;
    --color-base-80: #33322E;
    --color-base-90: #1A1917;
    --color-base-100: #000000;

    --color-blue-40: #3332FA;
    --color-blue-60: #0000CC;

    --color-tx: var(--color-base-100);
    --color-tx-2: var(--color-base-60);
    --color-tx-3: var(--color-base-50);
    --color-ui: var(--color-blue-60);
    --color-ui-2: var(--color-blue-40);
    --color-ui-3: var(--color-base-40);
    --color-bg: var(--color-base-00);
    --color-bg-2: var(--color-base-10);
}

.theme-dark {
    --color-tx: var(--color-base-00);
    --color-tx-2: var(--color-base-40);
    --color-tx-3: var(--color-base-50);
    --color-ui: var(--color-blue-40);
    --color-ui-2: var(--color-blue-60);
    --color-ui-3: var(--color-base-60);
    --color-bg: var(--color-base-100);
    --color-bg-2: var(--color-base-80);
}

body,
html {
  height: 100%;
  margin: 0 !important;
  padding: 0 !important;
}

html {
    box-sizing: border-box;
  }
  
*,
*:after,
*:before {
    box-sizing: inherit;
}

* {
    margin: 0;
    -webkit-font-feature-settings: "kern" 1;
    font-feature-settings: "kern" 1;
    -webkit-font-kerning: normal;
    font-kerning: normal;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
}

html {
    font-size: 16px;
}
body {
    /* font-family: 'Times New Roman', Times, serif; */
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 0.02em;
    line-height: 1.1;
    color: var(--color-tx);
    background-color: var(--color-bg);
}

a, a:visited {
    cursor: pointer;
    color: var(--color-ui);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
    color: var(--color-ui-2);
}
a[href^="http"]::after {
    content: "\21F2";
}
a.link-wrapper {
    color: inherit;
    text-decoration: none;
}

h1,h2,h3,h4,h5,h6, p {
    font-size: 1rem;
}

figcaption {
    font-size: 0.8rem;
}

img {
    width: 100%;
    vertical-align: baseline;
}

code {
    font-family: 'Menlo', 'Courier New', Courier, monospace;
    background-color: var(--color-bg-2);
    color: var(--color-tx);
    /* border-radius: 2px; */
    /* border: 1px var(--color-bg-2) solid; */
    /* padding: 2px; */
    font-size: 0.8rem;
    text-wrap:initial;
}

ul, ol {
    list-style: none;
    padding: 0;
}

blockquote {
    padding-left: 1rem;
    border-left: 1px solid var(--color-bg-2);
}
hr {
    border-top: 0;
    border-bottom: 1px solid var(--color-bg-2);
}

/* Utilities */

.flex {
    display: flex;
    gap: 1rem;
}
.flex-grow {
    flex-grow: 1;
}
.flex-shrink {
    flex-shrink: 1;
}
.flex-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.bg {
    background-color: var(--color-bg);
}
.plain {
    color: var(--color-tx);
}
.muted {
    color: var(--color-tx-2);
}
.smaller {
    font-size: 0.8em;
}
.faint {
    color: var(--color-tx-3);
}
.tab-nums {
    font-variant-numeric: tabular-nums;;
}

/* --- */

.main {
    padding: 0 var(--x);
    min-height: 100vh;
    padding-bottom: 6rem;    
}
.header {
    padding: var(--x) 0;
    padding-bottom: 3rem;
    position: sticky;
    top: 0;
}

.menu {
    row-gap: 0;
    text-align: right;
}
@media only screen and (max-width: 600px) {
    .menu {
        flex-direction: column;
    }
  }

.page-header {
    margin-top: 1rem;
    margin-bottom: 2rem;
}
.page-title {
    font-size: 1.5rem;
    font-weight: 100;
}

.section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}
.section-title {
    font-weight: 100;
    color: var(--color-tx-2);
}

.page-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.page-content ul {
    list-style:circle;
    padding-left: 1rem;
}
.page-content ol {
    list-style:decimal;
    padding-left: 1rem;
}
.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6,
.page-content img {
    margin-top: 1rem;
}

.related {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: var(--color-tx-2);
}
.related__list {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--x);
}
.related__item {
    padding: var(--x);
    border: 1px solid var(--color-bg-2);
    border-radius: var(--x);
    /* background-color: var(--color-bg-2); */
    font-size: 0.8rem;
}

.cards {
    display: grid;
    /* grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); */
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.card {
    border: 1px solid var(--color-bg-2);
    padding: 0.5rem;
}

.stale-link {
    opacity: 0.5;
}

.layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: var(--x) auto;
    max-width: var(--wrap);
}

.homepage-figure {
    position: fixed;
    max-width: var(--wrap);
    margin: 0;
    padding: var(--x);
    width: 100%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.feed__list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.feed__item {
    border: 1px solid var(--color-bg-2);
    border-bottom: none;
    padding: 0.5rem;
}

.note {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}
.note__date {
    color: var(--color__2nd);
}
.note__title {
    font-weight: 100;
}

.footer {
    position: fixed;
    bottom: 0;
    width: calc(100% - var(--x) - var(--x));
    row-gap: 0;
    padding: var(--x) 0;
}
@media only screen and (max-width: 300px) {
    .footer {
        flex-direction: column;
    }
}
