:root {
    --primary-color: #2c3e50;
    --secondary-color: #9bd9ff;
    --text-color: #fff8f5;
    --background-color: #000;
    --code-background: #000000;
    --border-color: #a69f8f;
    --link-hover-color: #ff7948;
    --node-background: rgba(54,41,35,0.8);
    --max-width: 960px;
}

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

body {
    font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background-color) url('../images/sunset.jpg') no-repeat center top;
    background-size: cover;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

header nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    gap: 2rem;
}

header nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

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

/* Integrated navigation styles */
header nav.integrated-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

header nav.integrated-nav .nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

header nav.integrated-nav .nav-links-left,
header nav.integrated-nav .nav-links-right {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    min-width: 0;
}

header nav.integrated-nav .page-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    border: none;
    padding: 0;
    text-align: center;
    flex: 1;
    position: relative;
    white-space: nowrap;
    min-width: 0;
}

header nav.integrated-nav .page-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, white 20%, white 80%, transparent 100%);
}

header nav.integrated-nav .nav-links-left {
    justify-content: flex-start;
    flex: 1;
}

header nav.integrated-nav .nav-links-right {
    justify-content: flex-end;
    flex: 1;
}

header nav.integrated-nav a {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

header nav.integrated-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
    min-height: calc(100vh - 200px);
}

h1, h2, h3, h4, h5, h6 {
    margin: 1.5rem 0 0.5rem 0;
    color: var(--text-color);
}

h1 {
    font-size: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

h2 {
    font-size: 1.25rem;
}

h3 {
    font-size: 1.1rem;
}

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--link-hover-color);
    text-decoration: none;
}

a:visited {
    color: var(--secondary-color);
}

.blog-posts {
    margin-top: 2rem;
}

.blog-summary {
    border: 1px solid var(--border-color);
    background-image: url('../images/nodebackground.png');
    background-repeat: repeat;
    padding: 1em;
    border-radius: 10px;
    margin-bottom: 1em;
    position: relative;
}

.blog-summary:first-child {
    margin-top: 0;
}

.blog-summary:last-child {
    border-bottom: 1px solid var(--border-color);
}

.blog-summary h2 {
    margin: 0 0 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.1rem;
    padding-bottom: 0.25rem;
}

.blog-summary time {
    color: var(--text-color);
    font-size: 0.9rem;
    font-style: italic;
}

.blog-summary p {
    margin-top: 0.5rem;
}

.blog-summary .summary {
    margin-top: 0.5rem;
}

.blog-summary .summary p {
    margin: 0;
}

.blog-summary .summary-text {
    display: inline;
}


footer {
    background-color: #000;
    color: var(--text-color);
    text-align: center;
    padding: 1rem 0;
    margin-top: 3rem;
    font-size: 0.8rem;
}

footer p {
    margin: 0;
}

footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

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

code {
    white-space: pre;
    display: inline-block;
    font-family: "Courier New", Courier, monospace;
    background-color: var(--code-background);
    color: #ffffff;
    padding: 2px 4px;
    border: 1px dashed #8a8a8a;
}

pre {
    white-space: pre;
    display: block;
    font-family: "Courier New", Courier, monospace;
    background-color: var(--code-background);
    color: #ffffff;
    margin: 10px;
    padding: 10px;
    border: 1px dashed #8a8a8a;
    overflow-x: auto;
    font-weight: bold;
}

pre code {
    background-color: transparent;
    padding: 0;
    border: none;
    display: inline;
}

blockquote {
    display: block;
    padding: 15px 15px 15px 35px;
    margin: 10px;
    border-bottom: dashed 1px var(--border-color);
    border-top: dashed 1px var(--border-color);
    color: var(--text-color);
    background: var(--background-color) url('../images/quote.png') no-repeat scroll 5px 10px;
}

blockquote p {
    margin: 0;
}

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

/* Inline image styling */
.inline-image {
    display: block;
    margin: 1rem auto;
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

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

table th {
    background-color: var(--code-background);
    font-weight: bold;
}

/* Pagination styles */
.pagination {
    margin: 2rem 0;
    text-align: center;
}

.pagination-links {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-link {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    color: var(--link-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--background-color);
    transition: background-color 0.2s ease;
}

.pagination-link:hover {
    background-color: var(--code-background);
    text-decoration: none;
}

.pagination-link.current {
    background-color: var(--link-color);
    color: var(--background-color);
    font-weight: bold;
}

.pagination-link.disabled {
    color: var(--text-color);
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--background-color);
}

.pagination-link.disabled:hover {
    background-color: var(--background-color);
}

.pagination-ellipsis {
    display: inline-block;
    padding: 0.5rem 0.5rem;
    color: var(--text-color);
    opacity: 0.6;
}

/* Page styling */
.page {
    border: 1px solid var(--border-color);
    background-image: url('../images/nodebackground.png');
    background-repeat: repeat;
    padding: 2em;
    border-radius: 10px;
    position: relative;
}

.page h1 {
    margin: 0 0 1rem 0;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    font-size: 1.8rem;
    color: var(--text-color);
}

.page .content {
    line-height: 1.6;
}

/* Blog post styling */
.blog-post {
    border: 1px solid var(--border-color);
    background-image: url('../images/nodebackground.png');
    background-repeat: repeat;
    padding: 1em;
    border-radius: 10px;
    margin-bottom: 1em;
}

.blog-post h1 {
    font-weight: bold;
    text-align: center;
    margin-top: 1.56em;
    margin-bottom: 0.66em;
    line-height: 1.66em;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 1.5rem;
}

.blog-post .submitted {
    font-style: italic;
    margin-bottom: 0.25em;
    padding-bottom: 0;
}

.blog-post .author {
    font-style: italic;
    margin-bottom: 1em;
    border-bottom: 1px dotted var(--border-color);
    padding-bottom: 0.5em;
}

.blog-post table {
    margin-left: auto;
    margin-right: auto;
}

.blog-post thead {
    border-bottom: 1px solid var(--border-color);
}

.blog-post th {
    margin-left: 1em;
    margin-right: 1em;
    padding-right: 1em;
    text-align: center;
}

.blog-post td {
    margin-left: 1em;
    margin-right: 1em;
    padding-right: 1em;
    text-align: center;
}

.blog-post table tr.odd {
    background: #362923;
    background: rgba(54,41,35,0.42);
}

.blog-post table tr.even {
    background: #272926;
    background: rgba(39,41,38,0.42);
}

.blog-post ul, .blog-post ol {
    margin-left: 0;
    padding-left: 2em;
    margin-bottom: 1rem;
    margin-top: 0;
}

.blog-post li {
    margin: 0;
    padding: 0;
    line-height: 1.6;
    margin-bottom: 0;
}

.blog-post ul li {
    margin-bottom: 0;
    padding-bottom: 0;
}

.blog-post ol li {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Main container styling */
main {
    background: transparent;
}

/* Preview image styling */
.preview-image-small {
    float: right;
    margin: 0 0 1em 1em;
    width: 75px;
}

.preview-image-small img {
    width: 75px;
    height: 75px;
    border-radius: 5px;
}

.preview-image-large {
    float: right;
    margin: 1em 0 1em 1em;
    width: 150px;
    clear: right;
}

.preview-image-large img {
    width: 150px;
    height: 150px;
    border-radius: 10px;
}

/* Header styling update */
header {
    background: transparent;
    color: var(--text-color);
}

header nav a {
    color: var(--text-color);
}

header nav a:hover {
    color: var(--link-hover-color);
}

@media (max-width: 768px) {
    body {
        font-size: 0.95rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
}

/* Tag styling */
.blog-content-with-sidebar {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.blog-posts {
    flex: 2;
}

.tag-sidebar {
    flex: 0 0 auto;
    min-width: max-content;
    max-width: 200px;
    border: 1px solid var(--border-color);
    background-image: url('../images/nodebackground.png');
    background-repeat: repeat;
    padding: 1em;
    border-radius: 10px;
    height: fit-content;
    position: sticky;
    top: 2rem;
    margin-top: 2rem;
}

.tag-sidebar h3 {
    margin: 0 0 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.25rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

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

.tag-list li {
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.tag-list li a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.tag-list li a:hover {
    color: var(--link-color);
}

.tag-name {
    color: var(--text-color);
    font-weight: 500;
}

.tag-count {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-left: 0.25rem;
}

.post-tags {
    margin: 0.5rem 0;
}

.post-tags a {
    text-decoration: none;
}

.post-tags .tag {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

.post-tags a:hover .tag {
    background-color: var(--link-color);
    transform: scale(1.05);
    transition: all 0.2s ease;
}

/* Update mobile responsiveness for tags */
@media (max-width: 768px) {
    .blog-content-with-sidebar {
        flex-direction: column;
    }
    
    .tag-sidebar {
        position: static;
        order: -1;
    }
}

/* Tag page styles */
.tag-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.tag-page h2 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.tag-page .tag-count {
    color: var(--text-color);
    font-style: italic;
    margin-bottom: 2rem;
}
