:root {
    --color-primary: #e8654a;
    --color-accent: #4ec9b8;
    --color-background: #fef5f3;
    --color-text: #333;
    --color-text-muted: #666;
    --color-grey-light: #e8e8e8;
    --color-grey: #ddd;
    --color-white: #fff;
}

body {
    background-color: var(--color-background);
}

a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--color-primary);
    text-underline-offset: 2px;
}

a:visited {
    color: inherit;
    text-decoration-color: var(--color-primary);
}

a:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    text-decoration: none;
}

header,
footer,
main {
    max-width: 660px;
    width: 100%;
    margin: 0 auto;
    margin-top: 2em;
    padding: 0 20px;
    box-sizing: border-box;
    color: var(--color-text);
    font-family: "PT Sans", sans-serif;
}

header .header-container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 2em;
}

header .header-logo {
    flex-shrink: 0;
}

header .header-logo img {
    max-width: 80px;
    max-height: 80px;
    width: 100%;
    height: auto;
    display: block;
}

header .header-content {
    flex-grow: 1;
}

header .header-content h1 {
    margin: 0;
    margin-bottom: 8px;
}

header nav {
    font-size: 14px;
}

header nav a {
    margin: 0 4px;
}

ol.linenums {
    padding: 0;
    margin: 0;
    list-style-type: none;
}
ol.linenums li {
    padding: 0;
    margin: 0;
}

strong {
    color: var(--color-text);
    font-weight: bold;
}

h1 {
    margin-bottom: 12px;
}
h2 {
    margin-bottom: 6px;
}

td.code {
    width: 100%;
}

a.permalink {
    visibility: hidden;
    text-decoration: none;
}
h1:hover a.permalink,
h2:hover a.permalink,
h3:hover a.permalink,
h4:hover a.permalink {
    visibility: visible;
    color: var(--color-grey-light);
    font-size: 85%;
}
h1 a.permalink:hover,
h2 a.permalink:hover,
h3 a.permalink:hover,
h4 a.permalink:hover {
    color: var(--color-text-muted);
}

pre {
    font-family:
        Victor Mono,
        monospace;
    line-height: 1.5em;
    padding: 0.5em 1em;
    border-radius: 5px;
    overflow-x: auto;
}

footer {
    font-size: 14px;
    font-style: italic;
}

.footer-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2em 0 1em 0;
}

.footer-divider::before,
.footer-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--color-grey);
}

.footer-divider span {
    padding: 0 1em;
    font-size: 1em;
    font-style: normal;
    color: var(--color-text-muted);
}

.footer-content {
    margin-top: 1em;
}

footer img {
    max-width: 1em;
    max-height: 1em;
    margin-left: 0.2em;
}

main img {
    max-width: 90%;
    height: auto;
    display: block;
    margin: 1.5em auto;
    border: 1px solid var(--color-grey);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.meta-header {
    border-bottom: 1px solid var(--color-grey);
    margin-bottom: 1.5em;
}

blockquote {
    border-left: 4px solid var(--color-accent);
    margin-left: 0;
    margin-right: 0;
    padding-left: 1em;
    font-style: italic;
}

.meta-description {
    margin: 0.5em 0 1em 0;
    font-size: 1.1em;
    font-style: italic;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.meta-info {
    font-size: 0.9em;
    color: var(--color-text-muted);
    margin-bottom: 1em;
}

.meta-info .separator {
    margin: 0 0.5em;
}

.meta-info .tags {
    display: inline;
}

.meta-info .tags i {
    margin-right: 0.3em;
}

/* Generic tag styles - reusable across the site */
.tag {
    text-decoration: none;
    background-color: var(--color-grey-light);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85em;
    font-weight: normal;
    display: inline-block;
    transition: background-color 0.2s ease;
}

.tag:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
}

/* Tag container - for inline flex layout */
.tags,
.post-tags,
.project-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.3em;
    align-items: center;
}

.tag-posts-list {
    list-style: none;
    padding: 0;
    margin: 2em 0;
}

.tag-posts-list li {
    border-left: 4px solid var(--color-accent);
    padding-left: 1em;
    margin-bottom: 1.5em;
}

.tag-posts-list li:last-child {
    border-bottom: none;
}

.tag-posts-list > li > a {
    font-size: 1.2em;
    font-weight: bold;
}

.tag-posts-list .post-date {
    color: var(--color-text-muted);
    font-size: 0.9em;
}

.tag-posts-list .post-description {
    margin: 0.5em 0 0 0;
    color: var(--color-text-muted);
    font-style: italic;
}

/* Project list styles */
.project-list {
    list-style: none;
    padding: 0;
    margin: 2em 0;
}

.project-item {
    margin: 0 0 2em 0;
    padding: 0;
}

.project-container {
    display: flex;
    gap: 20px;
    align-items: center;
}

.project-logo {
    flex-shrink: 0;
    width: 120px;
    height: auto;
}

.project-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
    margin: 0;
    border: 1px solid var(--color-grey);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.project-content {
    flex-grow: 1;
    min-width: 0;
}

.project-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-bottom: 0.5em;
}

.project-title {
    font-size: 1.2em;
    font-weight: bold;
}

.project-header .separator {
    color: var(--color-text-muted);
}

.project-description {
    margin: 0;
    font-style: italic;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Responsive styles for mobile devices */
@media (max-width: 640px) {
    header,
    footer,
    main {
        margin-top: 1em;
        padding: 0 15px;
    }

    header .header-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }

    header .header-logo img {
        max-width: 60px;
        max-height: 60px;
    }

    header .header-content h1 {
        font-size: 1.5em;
    }

    header nav {
        font-size: 13px;
    }

    header nav a {
        margin: 0 2px;
    }

    pre {
        font-family:
            Victor Mono,
            monospace;
        padding: 0.4em 0.8em;
        overflow-x: auto;
        word-wrap: break-word;
    }

    code {
        word-wrap: break-word;
    }

    main table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .project-container {
        flex-direction: column;
        align-items: center;
    }

    .project-logo {
        width: 150px;
        max-width: 100%;
        height: auto;
    }

    .project-content {
        width: 100%;
    }

    .project-header {
        flex-direction: row;
        align-items: baseline;
        gap: 0.5em;
    }

    .project-header .separator {
        display: none;
    }

    .project-tags {
        flex-basis: 100%;
    }
}
