:root {
    --color-primary: #9B982F;
    --color-secondary: #2F379B;
    --color-dark: #141414;
    --color-neutral: #F7F3E8;

    --color-primary-50: rgba(155, 152, 47, 0.5);
    --color-secondary-20: rgba(47, 55, 155, 0.2);

    --font-headline: "Playfair Display", serif;
    --font-featured: "Inter", sans-serif;
    --font-body: "Roboto", sans-serif;
}

/* General */
* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

body {
    background-color: #f9f9f9;
    color: #555;
    font-family: var(--font-body), sans-serif;
}

h1, h2, strong {
    color: #333;
}

h1 {
    font-family: var(--font-featured);
    font-size: 1.5em;
    font-weight: 600;
    text-align: center;
    margin: 1.5em 0;
}

h2 {
    font-family: var(--font-featured);
    font-size: 1.25em;
    font-weight: 600;
    margin: 1.2em 0;
}

h3 {
    color: #444;
    font-family: var(--font-featured);
    font-size: 1.15em;
    font-weight: 550;
    margin: 1.1em 0;
}

a {
    color: var(--color-secondary);
    font-weight: 600;
    text-decoration: none;
}

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

strong, b {
  font-weight: 700;
}

p {
    margin-block-start: 1em;
    margin-block-end:   1em;
    line-height: 1.5;
}

hr {
    border: 1px solid #ddd;
    opacity: 80%;
}

blockquote {
    background: #f8f9fa;
    color: #333;
    font-style: italic;
    font-size: 1em;
    line-height: 1.2em;
    margin: 2em 0;
    padding: 1.2em;
    border-left: 4px solid #999;
    border-radius: 0.5em;
}

/* Main structure */
.container {
    max-width: 1024px;
    width: 100%;
    margin: 0 auto;
}

.container--400 {
    max-width: 400px;
}

.container--640 {
    max-width: 640px;
}

.container--800 {
    max-width: 800px;
}

.container--1000 {
    max-width: 1000px;
}

.box {
    background-color: #fff;
    box-shadow: rgba(149, 157, 165, 0.2) 0 8px 24px;
    padding: 24px;
    margin: 24px 0;
}

.box img {
    max-width: 100%;
    height: auto;
    display: block;
}

.header {
    background-color: var(--color-dark);
    color: #fff;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header a {
    color: #fff;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2em;
    color: white;
}

.nav {
    display: flex;
}

.nav__list {
    padding-inline-start: 0;
    display: flex;
    gap: 36px;
}

.nav__list > li {
    display: flex;
    align-items: center;
}

.nav__list > li a {
    display: block;
    width: 100%;
}

.nav__list > li a:hover {
    color: var(--color-primary);
}

.nav__list > li:last-child > a {
    background-color: #fff;
    color: var(--color-dark);

    display: block;
    padding: 12px;
    border-radius: 8px;
    width: max-content;
}

.nav__list > li:last-child > a:hover {
    color: #fff;
    background-color: var(--color-primary);
}

.main {
    flex: 1;
}

.footer {
    background-color: var(--color-dark);
    font-size: 0.9em;
}

.footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    min-height: 96px;
    gap: 2em;
}

.footer__title {
    color: #ffffff;
    font-family: var(--font-featured);
    font-weight: 700;
    font-size: 0.8em;
    text-transform: uppercase;
    margin-bottom: 0.75em;
}

.footer__item {
    padding: 24px;
    flex: 1 1 224px;
    max-width: 224px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer a {
    color: #a0a0b0;
    font-weight: 300;
}

.footer a:hover {
    color: var(--color-primary);
}

/* Post */
.post-img {
    width: 100%;
    height: auto;
    margin-top: 24px;
}

.post-tags {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.post-tag, .post-tag:link, .post-tag:visited {
    font-size: 0.8em;
    background-color: #f3f3f3;
    color: #555;
    padding: 5px 10px;
    border-radius: 15px;
}

.post-tag:hover {
    background-color: var(--color-primary);
    color: #fff;
}

.post-date {
    font-size: 0.8em;
    font-style: italic;
    margin: 1em 0 2em 0;
}

.post-body {
    text-align: justify;
    margin-bottom: 24px;
}

.content {
    background-color: #f9f9f9;
    border-left: 4px solid var(--color-secondary);
    border-radius: 4px;
    padding: 16px 16px 8px 16px;
    margin: 24px 0;
}

.content__title {
    margin: 0 0 12px;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

.content li::marker {
    color: var(--color-secondary);
    font-weight: bold;
}

/* Comments */
.box--comment {
    border-left: 4px solid var(--color-primary);
    line-height: 1.6;
}

.box--comment:nth-child(odd) {
    border-left: 4px solid var(--color-secondary);
    line-height: 1.6;
}

.box--comment__author {
    color: #555;
    font-size: 0.95em;
    font-weight: 700;
}

.box--comment__timestamp {
    color: #888;
    font-size: 0.8em;
    font-weight: 400;
}

/* Pagination */
.pagination {
    font-weight: bold;
    vertical-align: middle;
    margin-bottom: 24px;
}

.pagination div {
    display: flex;
    justify-content: center;
    padding: 8px 16px;
}

.pagination-arrow {
    border: #d5d6da solid 1px;
    font-size: larger;
}

.pagination-arrow:hover {
    background-color: var(--color-secondary);
    color: #fff;
}

/* Messages */
.messages {
    display: flex;
    align-items: center;
    margin-top: 12px;
    padding-left: 12px;
    font-size: 0.8em;
    line-height: 1.4em;
    border-radius: 4px;
    font-weight: bold;
}

.success {
    background-color: rgba(11, 102, 35, 0.2);
    color: rgba(11, 102, 35, 0.9);
}

.error {
    background-color: rgba(220, 53, 69, 0.2);
    color: rgba(220, 53, 69, 0.9);
}

.info {
    background-color: rgba(1, 87, 155, 0.2);
    color: rgba(1, 87, 155, 0.9);
}

.close-button {
    padding: 8px 12px;
    float: right;
    font-size: 1.5em;
    cursor: pointer;
}

.close-button:hover {
    color: #000;
}

/* Buttons */
.btn {
    background-color: #fff;
    font-size: 0.8em;
    cursor: pointer;
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 1em;
    display: inline-block;
    border: 3px solid;
    font-weight: bold;
    text-align: center;
}

.btn--secondary {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}

.btn--secondary:hover {
    background-color: var(--color-secondary-20);
    color: var(--color-secondary);
}

.btn--alert {
    border-color: rgba(220, 53, 69, 0.75);
    color: rgba(220, 53, 69, 0.75);
}

.btn--alert:hover {
    background-color: rgba(220, 53, 69, 0.2);
    color: rgba(220, 53, 69, 0.75);
}

.btn--success {
    border-color: rgba(11, 102, 35, 0.75);
    color: rgba(11, 102, 35, 0.75);
}

.btn--success:hover {
    background-color: rgba(11, 102, 35, 0.2);
}

/* Forms */
input[type=text],
input[type=password],
input[type=email],
textarea {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    border: 1px solid #ccc;
    border-radius: 0.375rem;
    color: #555;
}

input:focus {
    border-color: var(--color-primary);
    outline: 0;
    box-shadow: 0 0 0 0.2rem var(--color-primary-50);
}

label {
    font-size: 0.9em;
    color: #666;
    width: 100%;
    display: inline-block;
}

form ul {
    list-style-type: none;
    padding: 0;
}

.helptext, form ul {
    font-size: 0.8em;
    color: #999;
}

form > ul.errorlist {
    font-size: 0.8em;
    color: rgb(220, 53, 69);
}

/* Tables */
.striped-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.striped-table th {
    border-top: 1px solid #ddd;
}

.striped-table th, .striped-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.striped-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Lists */
.box ul, .box ol {
    padding-inline-start: 40px;
    margin-block-start: 1em;
    margin-block-end: 1em;
}

.box ul {
    list-style-type: disc;
    list-style-position: outside;
}

.box ol {
    list-style-type: decimal;
    list-style-position: outside;
}

.box li {
    margin-block-end: 0.5em;
    line-height: 1.6;
    padding: 0.25em 0;
}

.content li {
    line-height: 1;
    padding: 0;
}

/* utils */
.horizontal-center {
    display: flex;
    justify-content: center;
}

.MathJax {
    overflow-y: hidden;
}

pre {
    padding: 0;
    margin: 0;
}

.inline-code {
    background-color: #f4f4f4;
    border-radius: 4px;
    color: #666;
    padding: 4px;
}

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

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

/* Only desktop */
@media (min-width: 768px) {
    .header .container {
        height: 96px;
    }

    .only-desktop {
        display: block;
    }

    .only-mobile {
        display: none;
    }
}

/* Only mobile */
@media (max-width: 768px) {
    .container {
        max-width: 95%;
    }

    .header .container {
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
    }

    .header .container .logo {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-toggle {
        display: block;
    }

    .nav {
        width: 100%;
        display: none;
    }

    .nav.open {
        display: flex;
    }

    .nav__list {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav__list > li {
        padding: 12px 16px;
        margin-bottom: 12px;
        justify-content: flex-start;
    }

    .nav__list li:last-child {
        margin-bottom: 0;
    }

    .footer .container {
        gap: 8px;
    }

    .footer__item {
        padding: 16px;
    }

    .only-mobile {
        display: block;
    }

    .only-desktop {
        display: none;
    }
}
