* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Garamond, serif;
    line-height: 1.55;
    letter-spacing: 1.5;
    margin: 0;
    padding: 0;

    --font-code: 'Fira Mono', monospace;

    --sand: #EBEAE5;
    --light-grey: #D9D9D9;
    --dark-grey: #323232;
    --black-wash: #0C0C0C;
    --green: #b4c2b7;

    /* Light theme */
    --background-color: var(--sand);
    --text-color: var(--black-wash);
    --grey: var(--light-grey);

    color: var(--text-color);
    background-color: var(--background-color);
}

::selection {
    background: var(--green);  
    color: var(--black-wash);
}

::-moz-selection {
    background: var(--green);
    color: var(--black-wash);
}

h1 {
    line-height: 1.5;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0.5rem 0;
    width: 420px;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0.3rem 0;
}

p {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0.2rem;
}

q {
    font-size: 1.2rem;
    font-style: italic;
    max-width: 460px;
}

cite {
    font-size: 1.1rem;
}

cite::before {
    content: "— ";
}

.MathJax {
    color: var(--text-color);
}

a {
    text-decoration: none;
    cursor: pointer;
    color: var(--text-color);
    border-bottom: 1px solid var(--text-color);
}

ul {
    padding-left: 2rem;
    font-size: 1.05rem;
}

ul li {
    padding: 0.25rem 0;
}

table {
    border: 1px solid var(--text-color);
    margin: 1rem 0;
}

th {
    text-align: left;
}

th, td {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--text-color);
}

header {
    position: block;
    left: 0;
    top: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

nav {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 4rem;
    gap: 4rem;
    width: 100%;
}

nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 0;
}

nav ul li a {
    font-size: 1.1rem;
    text-decoration: none;
    border: none;
    opacity: 0.75;
}

nav ul li a:hover {
    text-decoration: none;
    opacity: 1;
}

strong {
    font-weight: 600;
}

main {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1rem 0;
    max-width: 920px;
}

section {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 0 4rem;
    gap: 0.8rem;
}

card {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--text-color);
    padding: 1vh 1.5vh;
}

.center {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.logo {
    height: 120px;
    width: 20px;
    background-color: var(--text-color);
    margin: 1.5rem 0;
}

.photo-frame {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0;
}

.photo-caption {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
}

.main-photo-caption {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    padding-left: 4rem;
}

pre {
    overflow-x: scroll;
    padding-top: 1rem;
}

code {
    color: var(--text-color);
    font-family: var(--font-code);
    background-color: var(--grey);
    padding: 0 1.5rem;
    line-height: 2;
    font-size: 0.8rem;
    margin: 1rem 0;
    width: 100%;
}

.circle {
    width: 125px;
    height: 125px;
    border: 1px solid var(--text-color);
    border-radius: 50%;
    background-color: var(--background-color);
}

.square {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 125px;
    height: 125px;
    border: 1px solid var(--text-color);
    background-color: var(--grey);
}

.couting-circles-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem 0;
}

.wason-card-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    max-width: 400px;
    width: 100%;
}

.wason-card {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    height: 60px;
    width: 45px;
    border: 1px solid var(--text-color);
}

.ishango-bone {
    display: inline-block;
    width: 100%;
    aspect-ratio: 8 / 5;
    mask-image: url('media/research/ishango-bone.svg');
    -webkit-mask-image: url('media/research/ishango-bone.svg');
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    background-color: var(--text-color);
}

.rabbits {
    display: inline-block;
    width: 100%;
    aspect-ratio: 8 / 5;
    mask-image: url('media/research/rabbits.svg');
    -webkit-mask-image: url('media/research/rabbits.svg');
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    background-color: var(--text-color);
}

.regions {
    display: inline-block;
    width: 100%;
    aspect-ratio: 2;
    mask-image: url('media/research/regions.svg');
    -webkit-mask-image: url('media/research/regions.svg');
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    background-color: var(--text-color);
}

.region-6 {
    display: inline-block;
    width: 100%;
    aspect-ratio: 2;
    mask-image: url('media/research/region6.svg');
    -webkit-mask-image: url('media/research/region6.svg');
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    background-color: var(--text-color);
}

.page-size, .resources {
    padding-top: 2rem;
}

footer {
    right: 0;
    bottom: 0;
}

footer container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    padding: 2rem 4rem;
    border-top: 1px solid var(--text-color);
}

footer container .left, footer container .right {
    display: flex;
    flex-direction: column;
    gap: 0.5rem; 
}

footer a {
    text-decoration: none;
    border: none;
}

@media (prefers-color-scheme: dark) {
/* Dark theme */
    body {
        --background-color: var(--black-wash);
        --text-color: var(--sand);
        --grey: var(--dark-grey);
    }
}

@media only screen and (max-width: 920px) {
    h1 {
        font-size: 1.15rem;
        width: 100%;
    }

    h2 {
        font-size: 0.95rem;
    }

    h3 {
        font-size: 0.9rem;
    }

    h4 {
        font-size: 0.8rem;
    }

    p {
        font-size: 0.8rem;
    }
    
    q {
        font-size: 0.85rem;
    }
    
    cite {
        font-size: 0.75rem;
    }

    code {
        font-size: 0.75rem;
    }

    nav {
        justify-content: space-between;
        padding: 2rem;
        gap: 0;
    }

    nav ul li {
        padding: 0.4rem 0;
    }

    nav ul li a {
        font-size: 0.75rem;
        opacity: 1;
    }

    content {
        gap: 0.5rem;
    }

    section {
        padding: 0.75rem 2rem;
    }

    table {
        margin: 0.5rem 0;
    }
    
    th, td {
        font-size: 0.75rem;
        padding: 0.5rem;
    }

    ul {
        padding-left: 1rem;
        font-size: 0.75rem;
    }

    ul li {
        padding: 0.1rem 0;
    }

    .main-photo-caption {
        padding: 0 2rem;
    }

    .couting-circles-container {
        flex-direction: column;
        gap: 2rem;
    }

    footer container {
        padding: 2rem;
    }

    footer container .right {
        display: none;
    }

    .hide-on-mobile {
        display: none;
    }
}
