/* --------------------------------
   Base
-------------------------------- */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #fdfdfb;
    color: #171717;

    font-family: "IBM Plex Sans", sans-serif;
    font-size: 17px;
    line-height: 1.6;
}


/* --------------------------------
   Header
-------------------------------- */

.site-header {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 32px;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: inherit;
    text-decoration: none;

    font-family: "IBM Plex Mono", monospace;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.04em;
}

nav {
    display: flex;
    gap: 24px;
}

nav a {
    color: inherit;
    text-decoration: none;

    font-family: "IBM Plex Mono", monospace;
    font-size: 13px;
}

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


/* --------------------------------
   Main layout
-------------------------------- */

main {
    max-width: 700px;
    margin: 0 auto;
    padding: 100px 32px 120px;
}


/* --------------------------------
   Typography
-------------------------------- */

.meta {
    margin-bottom: 24px;

    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    line-height: 1.5;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;

    font-family: "IBM Plex Serif", serif;
    font-weight: 400;
}

h1 {
    font-size: 48px;
    line-height: 1.12;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 32px;
    line-height: 1.2;
}

.lead {
    max-width: 620px;
    margin-top: 36px;

    font-size: 18px;
    line-height: 1.65;
}


/* --------------------------------
   Sections
-------------------------------- */

section {
    margin-bottom: 120px;
}

.research-item {
    padding: 32px 0;

    border-top: 1px solid #d6d6d2;
}

.research-item:last-child {
    border-bottom: 1px solid #d6d6d2;
}

.item-meta {
    margin-bottom: 14px;

    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    line-height: 1.5;
    letter-spacing: 0.04em;
}

.research-item p {
    margin: 10px 0 0;
}


/* --------------------------------
   About
-------------------------------- */

.about p {
    margin: 0;

    font-size: 18px;
    line-height: 1.65;
}


/* --------------------------------
   Footer
-------------------------------- */

footer {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px;

    border-top: 1px solid #d6d6d2;
}


/* --------------------------------
   Mobile
-------------------------------- */

@media (max-width: 700px) {

    .site-header {
        padding: 22px 20px;
    }

    nav {
        gap: 14px;
    }

    nav a {
        font-size: 11px;
    }

    main {
        padding: 70px 20px 80px;
    }

    h1 {
        font-size: 38px;
    }

    h2 {
        font-size: 28px;
    }

    .lead,
    .about p {
        font-size: 17px;
    }

    section {
        margin-bottom: 90px;
    }
}
/* --------------------------------
   Article
-------------------------------- */

.article-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 100px 32px 140px;
}

.article-meta {
    margin-bottom: 28px;

    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    line-height: 1.5;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.article-page h1 {
    margin: 0;

    font-family: "IBM Plex Serif", serif;
    font-size: 52px;
    line-height: 1.1;
    font-weight: 400;
    letter-spacing: -0.02em;
}

.article-subtitle {
    margin: 24px 0 70px;

    font-family: "IBM Plex Sans", sans-serif;
    font-size: 20px;
    line-height: 1.5;
}

.article-body p {
    margin: 0 0 22px;

    font-family: "IBM Plex Sans", sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

.article-body p:last-child {
    margin-bottom: 0;
}


/* --------------------------------
   Article — mobile
-------------------------------- */

@media (max-width: 700px) {

    .article-page {
        padding: 70px 20px 90px;
    }

    .article-page h1 {
        font-size: 40px;
    }

    .article-subtitle {
        font-size: 18px;
        margin-bottom: 50px;
    }

    .article-body p {
        font-size: 17px;
        line-height: 1.65;
        margin-bottom: 26px;
    }
}

/* =================================
   DARK THEME
================================= */

body.dark {
    background-color: #171716;
    color: #e6e4de;
}

body.dark .site-header {
    color: #e6e4de;
}

body.dark .logo,
body.dark nav a {
    color: #e6e4de;
}

body.dark .article-page {
    color: #e6e4de;
}

body.dark .article-meta {
    color: #a8a69f;
}

body.dark .article-subtitle {
    color: #c9c7c0;
}

body.dark .article-body {
    color: #e6e4de;
}

body.dark footer {
    color: #a8a69f;
    border-color: #3a3935;
}

body.compact .article-body p {
    font-size: 16px;
    line-height: 1.55;
    margin-bottom: 22px;
}

body.balanced .article-body p {
    font-size: 17px;
    line-height: 1.68;
    margin-bottom: 28px;
}

body.dense .article-body p {
    font-size: 16px;
    line-height: 1.48;
    margin-bottom: 20px;
}
