/* ===== CASSIDY-INSPIRED MINIMAL THEME ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    background: #fff;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ===== TYPOGRAPHY ===== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: #222;
    margin: 2rem 0 1rem 0;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

.site-title h1 {
    margin: 0;
    font-size: 2.5rem;
}

.site-description {
    font-size: 1.125rem;
    color: #666;
    margin: 0.5rem 0 2rem 0;
    font-weight: 400;
}

p {
    margin: 1rem 0;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ===== HEADER ===== */

.site-header {
    margin-bottom: 3rem;
}

.site-logo img {
    max-width: 200px;
    height: auto;
}

.site-title a {
    color: #222;
    text-decoration: none;
}

.site-title a:hover {
    color: #0066cc;
    text-decoration: none;
}

/* ===== NAVIGATION ===== */

.site-nav {
    flex-shrink: 0;
    position: relative;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.25rem;
}

.hamburger {
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 0;
}

.nav-menu a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.25rem 0;
    white-space: nowrap;
}

.nav-menu a:hover {
    color: #0066cc;
    text-decoration: underline;
}

/* ===== iPHONE-STYLE THEME TOGGLE ===== */

.theme-toggle-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.theme-icon {
    font-size: 1.1rem;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.theme-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.theme-toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 26px;
    transition: all 0.3s ease;
}

.theme-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.theme-toggle-input:checked + .theme-toggle-slider {
    background: #0066cc;
}

.theme-toggle-input:checked + .theme-toggle-slider:before {
    transform: translateX(24px);
}

/* Icon states */
.theme-toggle-input:checked ~ .theme-icon-moon {
    opacity: 1;
}

.theme-toggle-input:not(:checked) ~ .theme-icon-sun {
    opacity: 1;
}

/* ===== HOME ASSISTANT STATUS INDICATOR ===== */

.ha-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.05);
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.ha-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.ha-status-dot.online {
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2), 0 0 8px rgba(34, 197, 94, 0.4);
    animation: pulse-green 2s infinite;
}

.ha-status-dot.offline {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.ha-status-dot.checking {
    background: #f59e0b;
    animation: pulse-yellow 1.5s infinite;
}

.ha-status-text {
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

/* Status animations */
@keyframes pulse-green {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes pulse-yellow {
    0%, 100% { 
        opacity: 1;
    }
    50% { 
        opacity: 0.5;
    }
}

/* ===== MOBILE NAVIGATION ===== */

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 4rem 2rem 2rem;
        gap: 0;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        z-index: 1000;
    }
    
    .nav-menu.is-open {
        right: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
        margin-bottom: 2rem;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem 0;
        font-size: 1rem;
        color: #333;
    }
    
    .ha-status-indicator {
        margin-right: 0;
        margin-bottom: 1rem;
        justify-self: flex-start;
    }
    
    .theme-toggle-container {
        margin-left: 0;
        margin-top: 1rem;
    }
    
    /* Hamburger animation */
    .mobile-menu-toggle.is-active .hamburger:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .mobile-menu-toggle.is-active .hamburger:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.is-active .hamburger:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Mobile menu overlay */
    .nav-menu.is-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}

/* ===== READING PROGRESS ===== */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #0066cc, #00aaff);
    z-index: 1000;
    transition: width 0.1s ease;
}

/* ===== POST FEED - Simple List Style ===== */

.post-feed {
    margin: 2rem 0;
}

.post-card {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.post-card:last-child {
    border-bottom: none;
}

.post-card-image {
    display: none; /* Hidden by default for minimal design */
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Show feature images when enabled */
body[data-custom-show-feature-images="true"] .post-card-image {
    display: block;
}

.post-card-title {
    margin: 0 0 0.5rem 0;
}

.post-card-title a {
    color: #222;
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
}

.post-card-title a:hover {
    color: #0066cc;
    text-decoration: underline;
}

.post-card-excerpt {
    color: #555;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.post-card-footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.post-card-meta {
    font-size: 0.875rem;
    color: #888;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.post-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-card-tag {
    color: #0066cc;
    font-size: 0.8rem;
    /* background: #f0f8ff; */
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    text-decoration: none;
    display: inline-block;
}

.post-card-tag:hover {
    /* background: #e6f3ff; */
    text-decoration: underline;
}

/* ===== SINGLE POST ===== */

.post-header {
    margin-bottom: 2rem;
}

.post-title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.post-excerpt {
    font-size: 1.125rem;
    color: #666;
    font-style: italic;
    margin-bottom: 1rem;
}

.post-meta {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.post-feature-image {
    margin: 2rem 0;
}

.post-feature-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.post-content {
    margin: 2rem 0;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    margin: 2rem 0 1rem 0;
}

.post-content blockquote {
    border-left: 3px solid #ddd;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #666;
}

.post-content code {
    background: #333;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: #333;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid #eee;
}

.post-content pre code {
    background: none;
    padding: 0;
}

/* ===== POST FOOTER ===== */

.post-footer {
    margin-top: 0rem;
    padding-top: 0rem;
    /* border-top: 1px solid #eee; */
}

.post-tags {
    margin-bottom: 0rem;
}

.post-tags h4 {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.tag {
    display: inline-block;
    /* background: #f0f8ff; */
    color: #0066cc;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    text-decoration: none;
}

.tag:hover {
    /* background: #e6f3ff; */
    text-decoration: underline;
}

.author-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

/* Hide author bio when disabled */
body[data-custom-show-author-bio="false"] .author-card {
    display: none;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-size: 1.1rem;
    margin: 0 0 0.25rem 0;
}

/* ===== POST NAVIGATION ===== */

.post-navigation {
    margin-top: 2rem;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid #eee;
}

.nav-link {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-link:hover {
    background: #f0f8ff;
    text-decoration: none;
    color: #004499;
}

.nav-link.disabled {
    color: #ccc;
    cursor: not-allowed;
}

.nav-link.disabled:hover {
    background: transparent;
    color: #ccc;
}

.nav-random {
    font-weight: 600;
    border: 1px solid #0066cc;
}

.nav-random:hover {
    background: #0066cc;
    color: white;
}

.author-bio {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* ===== PAGINATION ===== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

.pagination a:hover {
    background: #f8f8f8;
    text-decoration: none;
}

.pagination .page-number.current {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

/* ===== BUTTONS ===== */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: #0066cc;
    color: white;
}

.btn-primary:hover {
    background: #0052a3;
    text-decoration: none;
}

/* ===== FOOTER ===== */

.site-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

.site-footer a {
    color: #666;
}

/* ===== ERROR PAGES ===== */

.error-content {
    text-align: center;
    padding: 3rem 0;
}

.error-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

/* ===== TAG & AUTHOR PAGES ===== */

.tag-header,
.author-header {
    margin-bottom: 2rem;
    text-align: center;
}

.tag-title,
.author-name {
    margin-bottom: 0.5rem;
}

.tag-description,
.author-bio {
    color: #666;
    margin-bottom: 1rem;
}

.tag-count,
.author-post-count {
    font-size: 0.9rem;
    color: #888;
}

.author-profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

.author-website {
    color: #0066cc;
    margin-top: 0.5rem;
    display: inline-block;
}

/* ===== HOME INTRODUCTION SECTION ===== */

.home-intro {
    /* margin: 3rem 0;
    padding: 2.5rem 0;
    background: #fafafa;
    border-radius: 8px; */
}

.intro-content {
    /* max-width: 700px; */
    margin: 0 auto;
    text-align: center;
}

.intro-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: #222;
    font-weight: 600;
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    margin: 0;
}

.intro-text p {
    margin-bottom: 1.5rem;
}

.intro-text p:last-child {
    margin-bottom: 0;
}

.intro-text a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.intro-text a:hover {
    text-decoration: underline;
}

/* Dark mode styles for intro section */
/* body[data-custom-color-scheme="Dark"] .home-intro {
    background: #2a2a2a;
} */

body[data-custom-color-scheme="Dark"] .intro-title {
    color: #fff;
}

body[data-custom-color-scheme="Dark"] .intro-text {
    color: #e5e5e5;
}

@media (prefers-color-scheme: dark) {
    body[data-custom-color-scheme="Auto"] .home-intro {
        background: #2a2a2a;
    }
    
    body[data-custom-color-scheme="Auto"] .intro-title {
        color: #fff;
    }
    
    body[data-custom-color-scheme="Auto"] .intro-text {
        color: #e5e5e5;
    }
}

/* Responsive design for intro section */
@media (max-width: 600px) {
    .home-intro {
        margin: 2rem 0;
        padding: 2rem 0;
    }
    
    .intro-title {
        font-size: 1.5rem;
    }
    
    .intro-text {
        font-size: 1rem;
    }
}

/* ===== NO POSTS MESSAGE ===== */

.no-posts {
    text-align: center;
    padding: 3rem 0;
    color: #666;
}

.no-posts h2 {
    margin-bottom: 1rem;
    color: #888;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 600px) {
    body {
        padding: 1rem 0.75rem;
    }
    
    .site-title h1 {
        font-size: 2rem;
    }
    
    .post-title {
        font-size: 1.75rem;
    }
    
    .site-nav ul {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .author-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

/* ===== KOENIG EDITOR STYLES ===== */

.kg-width-wide {
    width: 100%;
    margin: 2rem 0;
}

.kg-width-full {
    width: 100%;
    margin: 2rem 0;
}

.kg-width-wide img,
.kg-width-full img {
    width: 100%;
    height: auto;
}

/* ===== CUSTOM THEME SETTINGS ===== */

/* Typography Settings */
body[data-custom-typography="Classic serif"] {
    font-family: Georgia, 'Times New Roman', serif;
}

body[data-custom-typography="Monospace"] {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

body[data-custom-typography="JetBrains Mono"] {
    font-family: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-feature-settings: 'liga' on, 'calt' on;
    font-variant-ligatures: contextual;
}

body[data-custom-typography="JetBrains Mono"] h1,
body[data-custom-typography="JetBrains Mono"] h2,
body[data-custom-typography="JetBrains Mono"] h3,
body[data-custom-typography="JetBrains Mono"] h4,
body[data-custom-typography="JetBrains Mono"] h5,
body[data-custom-typography="JetBrains Mono"] h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

body[data-custom-typography="JetBrains Mono"] code,
body[data-custom-typography="JetBrains Mono"] pre {
    font-family: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-feature-settings: 'liga' on, 'calt' on;
}

/* Navigation Layout Settings */

/* Default: Logo on the left */
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-branding {
    display: flex;
    flex-direction: column;
}

/* Logo in the center */
.site-header[data-custom-navigation="Logo in the center"] .container {
    flex-direction: column;
    text-align: center;
}

.site-header[data-custom-navigation="Logo in the center"] .site-nav {
    margin-top: 1rem;
}

/* Logo on the right */
.site-header[data-custom-navigation="Logo on the right"] .container {
    flex-direction: row-reverse;
}

/* Stacked layout */
.site-header[data-custom-navigation="Stacked"] .container {
    flex-direction: column;
    text-align: center;
}

.site-header[data-custom-navigation="Stacked"] .site-nav {
    margin-top: 0rem;
}

/* Responsive navigation */
@media (max-width: 600px) {
    .site-header .container {
        flex-direction: column;
        text-align: center;
    }
    
    .site-header[data-custom-navigation="Logo on the right"] .container {
        flex-direction: column;
    }
}

/* Color Scheme Settings */
body[data-custom-color-scheme="Dark"] {
    background: #1a1a1a;
    color: #e5e5e5;
}

body[data-custom-color-scheme="Dark"] h1,
body[data-custom-color-scheme="Dark"] h2,
body[data-custom-color-scheme="Dark"] h3,
body[data-custom-color-scheme="Dark"] h4,
body[data-custom-color-scheme="Dark"] h5,
body[data-custom-color-scheme="Dark"] h6 {
    color: #fff;
}

body[data-custom-color-scheme="Dark"] .site-title a {
    color: #fff;
}

body[data-custom-color-scheme="Dark"] .post-card {
    border-bottom-color: #333;
}

body[data-custom-color-scheme="Dark"] .post-card-title a {
    color: #fff;
}

body[data-custom-color-scheme="Dark"] .site-footer {
    border-top-color: #333;
}

body[data-custom-color-scheme="Dark"] .hamburger {
    background: #fff;
}

body[data-custom-color-scheme="Dark"] .nav-menu {
    background: #1a1a1a;
    border-left: 1px solid #333;
}

body[data-custom-color-scheme="Dark"] .nav-menu li {
    border-bottom-color: #333;
}

body[data-custom-color-scheme="Dark"] .nav-menu a {
    color: #ccc;
}

body[data-custom-color-scheme="Dark"] .theme-toggle-slider {
    background: #555;
}

body[data-custom-color-scheme="Dark"] .theme-toggle-slider:before {
    background: #f0f0f0;
}

body[data-custom-color-scheme="Dark"] .ha-status-indicator {
    background: rgba(255, 255, 255, 0.1);
}

body[data-custom-color-scheme="Dark"] .ha-status-text {
    color: #ccc;
}

@media (prefers-color-scheme: dark) {
    body[data-custom-color-scheme="Auto"] {
        background: #1a1a1a;
        color: #e5e5e5;
    }
    
    body[data-custom-color-scheme="Auto"] h1,
    body[data-custom-color-scheme="Auto"] h2,
    body[data-custom-color-scheme="Auto"] h3,
    body[data-custom-color-scheme="Auto"] h4,
    body[data-custom-color-scheme="Auto"] h5,
    body[data-custom-color-scheme="Auto"] h6 {
        color: #fff;
    }
    
    body[data-custom-color-scheme="Auto"] .site-title a {
        color: #fff;
    }
    
    body[data-custom-color-scheme="Auto"] .post-card {
        border-bottom-color: #333;
    }
    
    body[data-custom-color-scheme="Auto"] .post-card-title a {
        color: #fff;
    }
    
    body[data-custom-color-scheme="Auto"] .site-footer {
        border-top-color: #333;
    }
}

/* ===== BLOG ARCHIVE PAGE ===== */

.blog-archive {
    margin: 2rem 0;
}

.archive-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.archive-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #222;
}

.archive-subtitle {
    font-size: 1.25rem;
    color: #666;
    font-weight: 400;
    margin-bottom: 2rem;
}

.archive-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
    display: block;
}

/* Archive Filters */
.archive-filters {
    margin-bottom: 3rem;
}

.year-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.year-filter {
    background: none;
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.year-filter:hover,
.year-filter.active {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
    text-decoration: underline;
}

.tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.tag-filter {
    /* color: #0066cc; */
    text-decoration: none;
    font-size: 0.9rem;
    /* background: #f0f8ff; */
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    transition: background-color 0.2s ease;
}

.tag-filter:hover,
.tag-filter.active {
    /* background: #e6f3ff; */
    text-decoration: underline;
}

/* Archive Content */
.year-section {
    margin-bottom: 4rem;
}

.year-heading {
    font-size: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    color: #222;
}

.year-posts {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.archive-post {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.archive-post:last-child {
    border-bottom: none;
}

.archive-post-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.archive-post-title a {
    color: #222;
    text-decoration: none;
}

.archive-post-title a:hover {
    color: #0066cc;
    text-decoration: underline;
}

.archive-post-date {
    font-size: 0.875rem;
    color: #888;
    margin-bottom: 0.5rem;
    display: block;
}

.archive-post-excerpt {
    color: #555;
    font-size: 0.95rem;
    margin: 0.5rem 0;
    line-height: 1.5;
}

.archive-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.archive-tag {
    /* color: #0066cc; */
    text-decoration: underline;
    font-size: 0.8rem;
    /* background: #f0f8ff; */
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.archive-tag:hover {
    /* background: #e6f3ff; */
    text-decoration: underline;
}

.no-results {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 2rem 0;
}

/* Dark mode styles for archive */
body[data-custom-color-scheme="Dark"] .archive-header {
    border-bottom-color: #333;
}

body[data-custom-color-scheme="Dark"] .archive-title {
    color: #fff;
}

body[data-custom-color-scheme="Dark"] .year-heading {
    color: #fff;
    border-bottom-color: #333;
}

body[data-custom-color-scheme="Dark"] .archive-post-title a {
    color: #fff;
}

body[data-custom-color-scheme="Dark"] .archive-post {
    border-bottom-color: #333;
}

body[data-custom-color-scheme="Dark"] .year-filter {
    border-color: #555;
    color: #ccc;
}

@media (prefers-color-scheme: dark) {
    body[data-custom-color-scheme="Auto"] .archive-header {
        border-bottom-color: #333;
    }
    
    body[data-custom-color-scheme="Auto"] .archive-title {
        color: #fff;
    }
    
    body[data-custom-color-scheme="Auto"] .year-heading {
        color: #fff;
        border-bottom-color: #333;
    }
    
    body[data-custom-color-scheme="Auto"] .archive-post-title a {
        color: #fff;
    }
    
    body[data-custom-color-scheme="Auto"] .archive-post {
        border-bottom-color: #333;
    }
    
    body[data-custom-color-scheme="Auto"] .year-filter {
        border-color: #555;
        color: #ccc;
    }
}

/* Responsive design for archive */
@media (max-width: 600px) {
    .archive-title {
        font-size: 2rem;
    }
    
    .archive-subtitle {
        font-size: 1.1rem;
    }
    
    /* .year-filters,
    .tag-filters {
        justify-content: flex-start;
    } */
    
    .year-heading {
        font-size: 1.75rem;
    }
}

/* ===== CODE SYNTAX HIGHLIGHTING ===== */

/* Base code styling */
code[class*="language-"],
pre[class*="language-"] {
    color: #f8f8f2;
    background: none;
    text-shadow: 0 1px rgba(0, 0, 0, 0.3);
    font-family: 'JetBrains Mono', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    word-wrap: normal;
    line-height: 1.5;
    tab-size: 4;
    hyphens: none;
}

/* Code blocks */
pre[class*="language-"] {
    padding: 1.5em;
    margin: 2em 0;
    overflow: auto;
    border-radius: 8px;
    background: #282a36;
    position: relative;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
    padding: 0.3em 0.5em;
    border-radius: 4px;
    background: #f0f8ff;
    color: #0066cc;
    white-space: normal;
}

/* Language label */
pre[class*="language-"]:before {
    content: attr(class);
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.5em 1em;
    font-size: 0.75em;
    color: #999;
    background: rgba(0, 0, 0, 0.3);
    border-bottom-left-radius: 4px;
    text-transform: uppercase;
    font-weight: 500;
}

/* Specific language labels */
pre.language-javascript:before { content: 'JavaScript'; }
pre.language-js:before { content: 'JavaScript'; }
pre.language-typescript:before { content: 'TypeScript'; }
pre.language-ts:before { content: 'TypeScript'; }
pre.language-html:before { content: 'HTML'; }
pre.language-css:before { content: 'CSS'; }
pre.language-scss:before { content: 'SCSS'; }
pre.language-python:before { content: 'Python'; }
pre.language-java:before { content: 'Java'; }
pre.language-php:before { content: 'PHP'; }
pre.language-ruby:before { content: 'Ruby'; }
pre.language-go:before { content: 'Go'; }
pre.language-rust:before { content: 'Rust'; }
pre.language-sql:before { content: 'SQL'; }
pre.language-json:before { content: 'JSON'; }
pre.language-xml:before { content: 'XML'; }
pre.language-yaml:before { content: 'YAML'; }
pre.language-yml:before { content: 'YAML'; }
pre.language-markdown:before { content: 'Markdown'; }
pre.language-md:before { content: 'Markdown'; }
pre.language-bash:before { content: 'Bash'; }
pre.language-shell:before { content: 'Shell'; }
pre.language-powershell:before { content: 'PowerShell'; }
pre.language-handlebars:before { content: 'Handlebars'; }
pre.language-hbs:before { content: 'Handlebars'; }

/* Syntax highlighting colors (Dracula theme) */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #6272a4;
}

.token.punctuation {
    color: #f8f8f2;
}

.token.namespace {
    opacity: 0.7;
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
    color: #ff79c6;
}

.token.boolean,
.token.number {
    color: #bd93f9;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #f1fa8c;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
    color: #f8f8f2;
}

.token.atrule,
.token.attr-value,
.token.function,
.token.class-name {
    color: #f1fa8c;
}

.token.keyword {
    color: #8be9fd;
}

.token.regex,
.token.important {
    color: #ffb86c;
}

.token.important,
.token.bold {
    font-weight: bold;
}

.token.italic {
    font-style: italic;
}

.token.entity {
    cursor: help;
}

/* Dark mode adjustments */
body[data-custom-color-scheme="Dark"] pre[class*="language-"] {
    background: #1a1a2e;
}

body[data-custom-color-scheme="Dark"] :not(pre) > code[class*="language-"] {
    background: #2a2a3e;
    color: #8be9fd;
}

/* Light mode code blocks */
body[data-custom-color-scheme="Light"] pre[class*="language-"] {
    background: #f8fafc;
    color: #2d3748;
    text-shadow: none;
    border: 1px solid #e2e8f0;
}

body[data-custom-color-scheme="Light"] .token.comment,
body[data-custom-color-scheme="Light"] .token.prolog,
body[data-custom-color-scheme="Light"] .token.doctype,
body[data-custom-color-scheme="Light"] .token.cdata {
    color: #718096;
}

body[data-custom-color-scheme="Light"] .token.punctuation {
    color: #2d3748;
}

body[data-custom-color-scheme="Light"] .token.property,
body[data-custom-color-scheme="Light"] .token.tag,
body[data-custom-color-scheme="Light"] .token.boolean,
body[data-custom-color-scheme="Light"] .token.number,
body[data-custom-color-scheme="Light"] .token.constant,
body[data-custom-color-scheme="Light"] .token.symbol {
    color: #d53f8c;
}

body[data-custom-color-scheme="Light"] .token.selector,
body[data-custom-color-scheme="Light"] .token.attr-name,
body[data-custom-color-scheme="Light"] .token.string,
body[data-custom-color-scheme="Light"] .token.char,
body[data-custom-color-scheme="Light"] .token.builtin {
    color: #38a169;
}

body[data-custom-color-scheme="Light"] .token.operator,
body[data-custom-color-scheme="Light"] .token.entity,
body[data-custom-color-scheme="Light"] .token.url,
body[data-custom-color-scheme="Light"] .token.variable {
    color: #2d3748;
}

body[data-custom-color-scheme="Light"] .token.atrule,
body[data-custom-color-scheme="Light"] .token.attr-value,
body[data-custom-color-scheme="Light"] .token.keyword {
    color: #3182ce;
}

body[data-custom-color-scheme="Light"] .token.function,
body[data-custom-color-scheme="Light"] .token.class-name {
    color: #d69e2e;
}

/* Copy code button styling */
.kg-code-card {
    margin: 2em 0;
}

.kg-code-card pre {
    margin: 0;
}

/* Responsive code blocks */
@media (max-width: 768px) {
    pre[class*="language-"] {
        padding: 1em;
        font-size: 0.85em;
        overflow-x: auto;
    }
    
    pre[class*="language-"]:before {
        font-size: 0.7em;
        padding: 0.4em 0.8em;
    }
}