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

/* Typography */
body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.4;
    color: #000;
    background-color: #e6f3ff;
    font-size: 18px;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5em;
    margin-top: 1em;
    color: #000;
    font-weight: bold;
}

h1 { font-size: 24px; }
h2 { font-size: 22px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
h5 { font-size: 18px; }
h6 { font-size: 18px; }

/* Links in headers */
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    color: inherit;
    text-decoration: none;
}

h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover {
    color: #f00;
    text-decoration: underline;
}

p {
    margin-bottom: 1em;
}

ul, ol {
    margin: 10px 0;
    padding-left: 2em;
}

li {
    margin-bottom: 5px;
}

ul ul, ol ol {
    margin: 5px 0;
}

/* Footnotes - reduce spacing to match paragraph line height */
.footnotes li {
    margin-bottom: 0;
}

.footnotes li p {
    margin-bottom: 0;
}

a {
    color: #0066cc;
    text-decoration: underline;
}

a:hover {
    color: #f00;
}

a:visited {
    color: #0066cc;
}

/* Layout */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.site-header {
    background-color: #f8f8f8;
    border-bottom: 1px solid #ccc;
    padding: 10px 0;
}

.navbar {
    display: block;
    text-align: left;
}

.site-title {
    font-size: 24px;
    font-weight: bold;
    color: #000 !important;
    display: block;
    margin-bottom: 10px;
    text-decoration: none;
}

.site-title:hover {
    color: #f00 !important;
    text-decoration: underline;
}

.site-title:visited {
    color: #000 !important;
}

.nav-menu {
    display: block;
}

.nav-link {
    color: #000;
    text-decoration: none;
    margin-right: 10px;
    font-size: 18px;
    font-weight: bold;
}

.nav-link:hover {
    color: #f00;
}

.nav-link:visited {
    color: #000;
}

.nav-link::before {
    content: "[ ";
}

.nav-link::after {
    content: " ]";
}

/* Main content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.main-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f8f8f8;
    border: 1px solid #ccc;
}

/* Hero section */
.hero {
    text-align: left;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 18px;
    margin-bottom: 10px;
}

.hero .subtitle {
    font-size: 14px;
    color: #000;
    margin-top: 5px;
}

.hero .description {
    margin-top: 10px;
    color: #000;
}

/* Intro section */
.intro {
    margin-bottom: 20px;
}

.intro h1 {
    margin-bottom: 10px;
    color: #000;
}

.intro-content p {
    margin-bottom: 10px;
    line-height: 1.4;
    font-size: 18px;
}

.intro-content a {
    color: #0066cc;
    text-decoration: underline;
}

.intro-content a:visited {
    color: #0066cc;
}

.intro-content a:hover {
    color: #f00;
}

/* Social Icons */
.social-icons {
    margin: 20px 0;
}

.social-icons a {
    color: #000;
    text-decoration: none;
    margin-right: 15px;
    font-size: 18px;
    display: inline-block;
}

.social-icons a:visited {
    color: #000;
}

.social-icons a:hover {
    color: #f00;
}

.social-icons svg {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

/* Cat Banner */
.cat-banner {
    margin: 20px 0;
    text-align: center;
}

.cat-banner img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* 88x31 Banner */
.banner {
    margin: 20px 0 0 0;
}

.banner-icon {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 0;
}

.banner-icon img {
    border: none;
    vertical-align: middle;
}

.banner-icon a {
    color: #0066cc;
    text-decoration: underline;
}

.banner-icon a:visited {
    color: #0066cc;
}

.banner-icon a:hover {
    color: #f00;
}

/* Posts */
.posts {
    width: 100%;
}

/* Links in post entries (list pages) */
.post-entry h2 a,
.post-entry h3 a {
    color: #0066cc;
    text-decoration: none;
}

.post-entry h2 a:visited,
.post-entry h3 a:visited {
    color: #0066cc;
}

.post-entry h2 a:hover,
.post-entry h3 a:hover {
    color: #f00;
    text-decoration: underline;
}

.post-entry {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.post-entry:last-child {
    border-bottom: none;
}

.post-entry h2,
.post-entry h3 {
    margin-bottom: 0.25rem;
}

.post-entry time {
    color: #666;
    font-size: 0.9rem;
}

.summary {
    margin-top: 0.5rem;
    color: #555;
}

.summary a {
    color: #0066cc;
    text-decoration: underline;
}

.summary a:visited {
    color: #0066cc;
}

.summary a:hover {
    color: #f00;
}

/* Tags */
.tags {
    margin-top: 1rem;
}

.tag {
    display: inline-block;
    background-color: #f0f0f0;
    color: #0066cc;
    padding: 2px 6px;
    margin-right: 8px;
    border: 1px solid #ccc;
    font-size: 12px;
    text-decoration: none;
}

.tag:visited {
    color: #0066cc;
}

.tag:hover {
    color: #f00;
    background-color: #e0e0e0;
}

/* Back to posts link */
.back-link {
    display: block;
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 0;
    text-align: left;
    color: #0066cc;
    text-decoration: none;
}

.back-link:visited {
    color: #0066cc;
}

.back-link:hover {
    color: #f00;
    text-decoration: underline;
}

/* Article content */
article {
    margin-bottom: 2rem;
}

article header {
    margin-bottom: 2rem;
    text-align: center;
}

article .content {
    line-height: 1.8;
}

article .content h1,
article .content h2,
article .content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

article .content ul,
article .content ol {
    margin: 10px 0;
    padding-left: 2rem;
}

article .content li {
    margin-bottom: 5px;
}

article .content ul ul,
article .content ol ol {
    margin: 5px 0;
    padding-left: 1.5rem;
}

article .content blockquote {
    border-left: 2px solid #000;
    padding-left: 10px;
    margin: 10px 0;
    color: #000;
    font-style: italic;
}

code, pre, kbd, samp {
    font-family: Consolas, Monaco, 'Liberation Mono', 'Courier New', monospace;
}

/* General pre styles for code blocks outside articles */
pre {
    background-color: #f0f0f0;
    padding: 10px;
    border: 1px solid #ccc;
    overflow-x: auto;
    margin: 10px 0;
    font-size: 16px;
    line-height: 1.5;
}

pre code {
    background: none;
    padding: 0 20px 0 0;
    display: inline-block;
    min-width: 100%;
}

article .content code {
    font-family: Consolas, Monaco, 'Liberation Mono', 'Courier New', monospace;
    background-color: #f0f0f0;
    padding: 2px 4px;
    font-size: 16px;
}

article .content pre code {
    background: none;
    padding: 0 20px 0 0;
    display: inline-block;
    min-width: 100%;
}

article .content pre {
    font-family: Consolas, Monaco, 'Liberation Mono', 'Courier New', monospace;
    background-color: #f0f0f0;
    padding: 10px;
    border: 1px solid #ccc;
    overflow-x: auto;
    margin: 10px 0;
    font-size: 16px;
    line-height: 1.5;
    position: relative;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
}

article .content img {
    max-width: 100%;
    height: auto;
}

/* Image Row - Multiple images in a row */
.image-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 1.5rem auto;
    max-width: 100%;
}

.image-row-link {
    display: block;
    flex: 0 1 auto;
    text-decoration: none;
    border: none;
    max-width: 100%;
}

.image-row-link:hover {
    opacity: 0.9;
}

.image-row img {
    height: 400px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0;
}

/* Responsive: Stack images vertically on mobile */
@media (max-width: 768px) {
    .image-row {
        flex-direction: column;
        align-items: center;
    }

    .image-row img {
        height: auto;
        width: 100%;
        max-width: 500px;
    }
}

/* Links in article content */
article .content a {
    color: #0066cc;
    text-decoration: underline;
}

article .content a:visited {
    color: #0066cc;
}

article .content a:hover {
    color: #f00;
    text-decoration: underline;
}

/* Prevent hover styles in code blocks */
article .content pre a {
    color: inherit;
    text-decoration: none;
}

article .content pre a:hover {
    color: inherit;
    text-decoration: none;
}

/* Table of Contents */
.toc {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    padding: 15px;
    margin: 20px 0;
}

.toc p {
    margin-top: 0;
    margin-bottom: 10px;
}

.toc ul {
    margin: 0;
    padding-left: 20px;
}

.toc li {
    margin-bottom: 3px;
}

.toc a {
    color: #0066cc;
    text-decoration: none;
    font-size: 16px;
}

.toc a:visited {
    color: #0066cc;
}

.toc a:hover {
    color: #f00;
    text-decoration: underline;
}

/* Footer */
.site-footer {
    background-color: #f8f8f8;
    border-top: 1px solid #ccc;
    padding: 20px 0;
    text-align: left;
    color: #000;
    font-size: 16px;
    margin-top: 40px;
}

.site-footer p {
    margin-bottom: 5px;
    line-height: 1.2;
}

.site-footer a {
    color: #0066cc;
    text-decoration: underline;
}

.site-footer a:visited {
    color: #0066cc;
}

.site-footer a:hover {
    color: #f00;
}

/* Error page */
.error-page {
    text-align: center;
    padding: 3rem 0;
}

/* Hamburger button */
.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1000;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #000;
    margin: 4px 0;
    transition: 0.3s;
}

/* Hamburger animation when active */
.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    /* Show hamburger on mobile */
    .hamburger {
        display: block;
    }

    /* Adjust site title on mobile */
    .site-title {
        margin-bottom: 0;
    }

    /* Hide nav menu by default on mobile */
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
    }

    /* Show nav menu when active */
    .nav-menu.active {
        display: block;
    }

    .nav-link {
        display: block;
        margin-bottom: 5px;
    }
}