            @import url(fonts/stylesheet.css);
            html{
                font-family: "Dejavu Serif";
                font-size: 14px;
                background-color: #edece9;
                margin:1.5em;
            }
            
            /* CSS Variables for consistent theming */
            :root {
                --bg-color: #edece9;
                --card-bg: #f5f4f1;
                --text-color: #333;
                --text-light: #666;
                --border-color: #8d8f89;
                --accent-color: #0d026f;
                --accent-hover: #1a0a8a;
                --accent-color-rgb: 13, 2, 111;
            }
            
            .box{
                display: flex;
                flex-direction: row;
                flex-wrap: wrap;
                justify-content: flex-start;
                font-family: "Dejavu Serif";
                line-height: 1.44;
                gap: 0.5em; /* Better spacing */
            }
            .items{
                padding: 1em;
                width: 250px;
                height: auto;
                border: 0.5px solid #8d8f89;
                margin-bottom: 0.5em;
                position: relative;
                box-sizing: border-box; /* Include padding in width calculation */
                flex-shrink: 0; /* Prevent items from shrinking */
            }
            
            .inside {
                position: relative;
                height: 100%;
                display: flex;
                flex-direction: column;
            }
            
            /* Make the text content grow to fill available space */
            .inside .txt {
                flex-grow: 1;
            }
            
            /* Dynamic font type support */
            .items[data-font="serif"] .txt { font-family: "Dejavu Serif" !important; }
            .items[data-font="sans"] .txt { font-family: "Dejavu Sans" !important; }
            .items[data-font="condensed"] .txt { font-family: "Dejavu Sans Condensed" !important; }
            .items[data-font="mono"] .txt { font-family: "Dejavu Sans Mono" !important; }
            
            .wide{
                width: 500px;
                height: auto !important;
                max-width: 100%; /* Ensure it doesn't overflow on small screens */
            }
            
            .wide .inside {
                height: auto;
                min-height: 250px;
            }
            .subtitle{
                margin-top: 0;
                margin-bottom: 0;
                font-family: "Dejavu Sans Condensed";
            }
            .external{
                font-family: "Dejavu Sans Mono";
                font-size: 0.9em;
            }
            .external a{
                color: #0d026f;
                text-decoration: none;
            }
            .inside figure img{
                margin-top: 1em;
                max-width: 100%;
                max-height: 100%;
                height: auto;
                width: auto;
                object-fit: contain; /* Better image scaling */
            }
            h3{
                font-family: "Dejavu Sans Condensed";
            }
            
            /* Tags styling */
            .tags {
                margin-top: auto;
                margin-bottom: 0;
                align-self: flex-end;
                width: 100%;
            }
            
            /* Ensure tags stay at bottom even in wide layout */
            .wide .inside {
                display: flex;
                flex-direction: column;
            }
            
            .wide .inside .tags {
                margin-top: auto;
            }
            
            .tag {
                display: inline-block;
                background: rgba(13, 2, 111, 0.1);
                color: #0d026f;
                padding: 0.2em 0.5em;
                margin: 0.1em 0.2em 0.1em 0;
                border-radius: 3px;
                font-family: "Dejavu Sans Condensed";
                font-size: 0.8em;
                border: 1px solid rgba(13, 2, 111, 0.2);
                vertical-align: top;
            }
            
            .tag a {
                color: inherit;
                text-decoration: none;
            }
            
            .tag a:hover {
                text-decoration: underline;
            }

            /* Special styling for View More tag */
            .tag-view-more a {
                text-decoration: underline;
                font-weight: normal;
            }
            
            .tag-view-more a:hover {
                color: var(--accent-color);
            }
            
            /* Post metadata */
            .post-meta {
                margin-top: 1em;
                font-family: "Dejavu Sans Mono";
                font-size: 0.8em;
                color: var(--text-light);
                border-top: 1px solid #ddd;
                padding-top: 0.5em;
            }
            
            /* Markdown content styling */
            .txt h1, .txt h2, .txt h3, .txt h4, .txt h5, .txt h6 {
                margin-top: 0;
                margin-bottom: 0.5em;
                font-family: "Dejavu Sans Condensed";
            }
            
            .txt h1 { font-size: 1.4em; }
            .txt h2 { font-size: 1.3em; }
            .txt h3 { font-size: 1.2em; }
            .txt h4 { font-size: 1.1em; }
            .txt h5 { font-size: 1.05em; }
            .txt h6 { font-size: 1em; }
            
            .txt p {
                margin-bottom: 1em;
            }
            
            .txt ul, .txt ol {
                margin-bottom: 1em;
                padding-left: 1.5em;
                line-height: 1.25;
            }
            
            .txt li {
                margin-bottom: 0.3em;
            }
            
            .txt blockquote {
                border-left: 3px solid var(--accent-color);
                margin: 1em 0;
                padding-left: 1em;
                font-style: italic;
                color: var(--text-light);
            }
            
            .txt code {
                background: rgba(0, 0, 0, 0.1);
                padding: 0.1em 0.3em;
                border-radius: 3px;
                font-family: "Dejavu Sans Mono";
                font-size: 0.9em;
            }
            
            .txt pre {
                background: rgba(0, 0, 0, 0.05);
                padding: 1em;
                border-radius: 4px;
                overflow-x: auto;
                border: 1px solid var(--border-color);
                margin-bottom: 1em;
            }
            
            .txt pre code {
                background: none;
                padding: 0;
            }
            
            .txt a {
                color: var(--accent-color);
                text-decoration: none;
            }
            
            .txt a:hover {
                text-decoration: underline;
            }
            
            /* Form Styles */
            .form-container {
                background-color: #f5f4f1;
                border: 1px solid #8d8f89;
                padding: 2em;
                margin-bottom: 2em;
                max-width: 500px;
            }
            
            .form-container h4 {
                margin-top: 0;
                font-family: "Dejavu Sans Condensed";
                font-size: 1.2em;
            }
            
            .form-group {
                margin-bottom: 1.5em;
            }
            
            .form-group label {
                display: block;
                margin-bottom: 0.5em;
                font-family: "Dejavu Sans Condensed";
                font-weight: bold;
            }
            
            .form-group input,
            .form-group textarea,
            .form-group select {
                width: 100%;
                padding: 0.5em;
                border: 1px solid #8d8f89;
                background-color: #ffffff;
                font-family: "Dejavu Serif";
                font-size: 14px;
                box-sizing: border-box;
                min-height: 44px; /* Touch-friendly minimum height */
            }
            
            .form-group textarea {
                resize: vertical;
                min-height: 100px;
            }
            
            button[type="submit"] {
                background-color: #0d026f;
                color: white;
                padding: 0.75em 1.5em;
                border: none;
                font-family: "Dejavu Sans Condensed";
                font-size: 1em;
                cursor: pointer;
                transition: background-color 0.3s;
            }
            
            button[type="submit"]:hover {
                background-color: #1a0a8a;
            }
            
            /* Font type classes */
            .font-serif { font-family: "Dejavu Serif" !important; }
            .font-sans { font-family: "Dejavu Sans" !important; }
            .font-sans-condensed { font-family: "Dejavu Sans Condensed" !important; }
            .font-mono { font-family: "Dejavu Sans Mono" !important; }

            /* Form styles for form.html */
            .content-form {
                font-family: "Dejavu Serif";
            }
            
            .content-form .form-group {
                margin-bottom: 1.5em;
            }
            
            .content-form label {
                display: block;
                margin-bottom: 0.5em;
                font-family: "Dejavu Sans Condensed";
                font-weight: bold;
                font-size: 0.9em;
            }
            
            .content-form input,
            .content-form textarea,
            .content-form select {
                width: 100%;
                padding: 0.5em;
                border: 1px solid #8d8f89;
                background-color: #ffffff;
                font-family: "Dejavu Serif";
                font-size: 14px;
                box-sizing: border-box;
                line-height: 1.44;
            }
            
            .content-form input[type="file"] {
                padding: 0.3em;
                font-family: "Dejavu Sans";
                font-size: 13px;
            }
            
            .form-hint {
                display: block;
                margin-top: 0.3em;
                font-family: "Dejavu Sans Mono";
                font-size: 0.8em;
                color: #666;
                font-style: italic;
            }
            
            .content-form textarea {
                resize: vertical;
                min-height: 120px;
            }
            
            .form-actions {
                margin-top: 2em;
                display: flex;
                gap: 1em;
            }
            
            .btn-primary {
                background-color: #0d026f;
                color: white;
                padding: 0.75em 1.5em;
                border: none;
                font-family: "Dejavu Sans Condensed";
                font-size: 1em;
                cursor: pointer;
                transition: background-color 0.3s;
            }
            
            .btn-primary:hover {
                background-color: #1a0a8a;
            }
            
            .btn-secondary {
                background-color: transparent;
                color: #0d026f;
                padding: 0.75em 1.5em;
                border: 1px solid #0d026f;
                font-family: "Dejavu Sans Condensed";
                font-size: 1em;
                cursor: pointer;
                transition: all 0.3s;
            }
            
            .btn-secondary:hover {
                background-color: #0d026f;
                color: white;
            }

            /* Admin interface styles */
            .admin-bar {
                background: var(--accent-color);
                color: white;
                padding: 1rem;
                margin-bottom: 2rem;
                border-radius: 8px;
                display: flex;
                justify-content: space-between;
                align-items: center;
                flex-wrap: wrap;
                gap: 1rem;
            }
            
            .admin-controls {
                display: flex;
                gap: 1rem;
                align-items: center;
                flex-wrap: wrap;
            }
            
            .admin-controls a,
            .admin-controls button {
                background: rgba(255, 255, 255, 0.2);
                color: white;
                padding: 0.5rem 1rem;
                border: none;
                border-radius: 4px;
                text-decoration: none;
                cursor: pointer;
                transition: background-color 0.2s;
            }
            
            .admin-controls a:hover,
            .admin-controls button:hover {
                background: rgba(255, 255, 255, 0.3);
            }
            
            .post-admin-actions {
                margin-top: 1rem;
                padding: 0.5rem;
                background: rgba(0, 0, 0, 0.05);
                border-radius: 4px;
                display: flex;
                gap: 0.5rem;
            }
            
            .post-admin-actions a {
                font-size: 0.85rem;
                color: var(--accent-color);
                text-decoration: none;
                padding: 0.25rem 0.5rem;
                border-radius: 3px;
                background: white;
                border: 1px solid var(--border-color);
            }
            
            .post-admin-actions a:hover {
                background: var(--accent-color);
                color: white;
            }
            
            .filters-section {
                background: var(--card-bg);
                padding: 1rem;
                margin-bottom: 2rem;
                border-radius: 8px;
                border: 1px solid var(--border-color);
            }
            
            .filters-form {
                display: flex;
                gap: 1rem;
                align-items: end;
                flex-wrap: wrap;
            }
            
            .filter-group {
                display: flex;
                flex-direction: column;
                gap: 0.25rem;
            }
            
            .filter-group label {
                font-size: 0.85rem;
                color: var(--text-color);
                font-weight: 500;
            }
            
            .filter-group input,
            .filter-group select {
                padding: 0.5rem;
                border: 1px solid var(--border-color);
                border-radius: 4px;
                font-size: 0.9rem;
            }
            
            .filter-actions {
                display: flex;
                gap: 0.5rem;
            }
            
            .filter-actions button {
                padding: 0.5rem 1rem;
                border: 1px solid var(--border-color);
                border-radius: 4px;
                background: var(--accent-color);
                color: white;
                cursor: pointer;
                font-size: 0.9rem;
            }
            
            .filter-actions button:hover {
                background: var(--accent-hover);
            }

            /* View More button styles */
            .view-more {
                margin-top: 1rem;
                text-align: center;
            }
            
            .view-more a {
                display: inline-block;
                background: var(--accent-color);
                color: white;
                padding: 0.5rem 1.5rem;
                border-radius: 4px;
                text-decoration: none;
                font-weight: 500;
                transition: background-color 0.2s;
            }
            
            .view-more a:hover {
                background: var(--accent-hover, #0056b3);
            }

            /* Subtle View More button styles */
            .view-more-subtle {
                margin-top: 0.5rem;
                text-align: right;
                font-size: 0.85em;
            }
            
            .view-more-subtle a {
                color: var(--text-light);
                text-decoration: none;
                font-family: "Dejavu Sans Condensed";
                font-weight: normal;
                transition: color 0.2s;
            }
            
            .view-more-subtle a:hover {
                color: var(--accent-color);
                text-decoration: underline;
            }

            /* Admin form styles */
            .admin-header {
                display: flex;
                justify-content: space-between;
                align-items: center;
                margin-bottom: 2rem;
                padding: 1rem;
                background: var(--card-bg);
                border-radius: 8px;
            }
            
            .admin-nav a {
                margin-left: 1rem;
                color: var(--accent-color);
                text-decoration: none;
            }
            
            .admin-nav a:hover {
                text-decoration: underline;
            }
            
            .form-container {
                max-width: 1200px;
                margin: 0 auto;
            }
            
            .form-layout {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 2rem;
            }
            
            .form-section {
                background: var(--card-bg);
                padding: 1.5rem;
                border-radius: 8px;
                box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            }
            
            .form-section h3 {
                margin-top: 0;
                margin-bottom: 1.5rem;
                color: var(--text-color);
            }
            
            .form-group {
                margin-bottom: 1.5rem;
            }
            
            .form-group label {
                display: block;
                margin-bottom: 0.5rem;
                font-weight: bold;
                color: var(--text-color);
            }
            
            .form-group input,
            .form-group select,
            .form-group textarea {
                width: 100%;
                padding: 0.75rem;
                border: 1px solid var(--border-color);
                border-radius: 4px;
                font-size: 1rem;
                font-family: inherit;
                box-sizing: border-box;
            }
            
            .form-group textarea {
                resize: vertical;
                min-height: 200px;
                font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
            }
            
            .form-group input:focus,
            .form-group select:focus,
            .form-group textarea:focus {
                outline: none;
                border-color: var(--accent-color);
                box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
            }
            
            .form-hint {
                font-size: 0.875rem;
                color: var(--text-muted);
                margin-top: 0.25rem;
            }
            
            .form-actions {
                display: flex;
                gap: 1rem;
                margin-top: 2rem;
            }
            
            .btn {
                padding: 0.75rem 1.5rem;
                border: none;
                border-radius: 4px;
                font-size: 1rem;
                cursor: pointer;
                text-decoration: none;
                display: inline-block;
                text-align: center;
                transition: background-color 0.2s;
            }
            
            .btn-primary {
                background: var(--accent-color);
                color: white;
            }
            
            .btn-primary:hover {
                background: var(--accent-hover);
            }
            
            .btn-secondary {
                background: var(--border-color);
                color: var(--text-color);
            }
            
            .btn-secondary:hover {
                background: #ddd;
            }
            
            .btn-danger {
                background: #dc3545;
                color: white;
            }
            
            .btn-danger:hover {
                background: #c82333;
            }
            
            .preview-section {
                background: var(--card-bg);
                padding: 1.5rem;
                border-radius: 8px;
                box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            }
            
            .preview-content {
                border: 1px solid var(--border-color);
                border-radius: 4px;
                padding: 1rem;
                min-height: 200px;
                background: white;
            }
            
            .success-message {
                background: #e8f5e8;
                border: 1px solid #4caf50;
                color: #2e7d32;
                padding: 1rem;
                border-radius: 4px;
                margin-bottom: 1rem;
            }
            
            .error-message {
                background: #ffebee;
                border: 1px solid #f44336;
                color: #c62828;
                padding: 1rem;
                border-radius: 4px;
                margin-bottom: 1rem;
            }
            
            .tag-suggestions {
                display: flex;
                flex-wrap: wrap;
                gap: 0.5rem;
                margin-top: 0.5rem;
            }
            
            .tag-suggestion {
                background: var(--accent-color);
                color: white;
                padding: 0.25rem 0.5rem;
                border-radius: 12px;
                font-size: 0.8rem;
                cursor: pointer;
                transition: background-color 0.2s;
            }
            
            .tag-suggestion:hover {
                background: var(--accent-hover);
            }
            
            .markdown-help {
                font-size: 0.875rem;
                color: var(--text-muted);
                margin-top: 0.5rem;
            }
            
            .markdown-help code {
                background: rgba(0, 0, 0, 0.1);
                padding: 0.1rem 0.3rem;
                border-radius: 3px;
            }
            
            /* Subtitle selector styles */
            .subtitle-selector {
                display: flex;
                gap: 0.5rem;
                align-items: center;
            }
            
            .subtitle-selector select {
                flex: 1;
            }
            
            .subtitle-selector button {
                background: var(--accent-color);
                color: white;
                border: none;
                width: 40px;
                height: 40px;
                border-radius: 50%;
                font-size: 1.2rem;
                font-weight: bold;
                cursor: pointer;
                display: flex;
                align-items: center;
                justify-content: center;
                transition: background-color 0.2s;
            }
            
            .subtitle-selector button:hover {
                background: var(--accent-hover, #0056b3);
            }
            
            .subtitle-selector #add_permanent_btn {
                background: #28a745;
                width: 50px;
                font-size: 1rem;
            }
            
            .subtitle-selector #add_permanent_btn:hover {
                background: #218838;
            }
            
            /* Modal styles */
            .modal {
                display: none;
                position: fixed;
                z-index: 1000;
                left: 0;
                top: 0;
                width: 100%;
                height: 100%;
                background-color: rgba(0, 0, 0, 0.5);
            }
            
            .modal-content {
                background-color: white;
                margin: 15% auto;
                padding: 20px;
                border-radius: 8px;
                width: 90%;
                max-width: 500px;
                box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            }
            
            .modal-header {
                display: flex;
                justify-content: space-between;
                align-items: center;
                margin-bottom: 20px;
                padding-bottom: 10px;
                border-bottom: 1px solid #eee;
            }
            
            .modal-header h3 {
                margin: 0;
                color: var(--text-color);
            }
            
            .modal-close {
                background: none;
                border: none;
                font-size: 24px;
                cursor: pointer;
                color: #999;
                padding: 0;
                width: 30px;
                height: 30px;
                display: flex;
                align-items: center;
                justify-content: center;
            }
            
            .modal-close:hover {
                color: #333;
            }
            
            .modal-body {
                margin-bottom: 20px;
            }
            
            .modal-footer {
                display: flex;
                justify-content: flex-end;
                gap: 10px;
            }
            
            .custom-subtitle-input {
                display: flex;
                gap: 0.5rem;
                align-items: center;
            }
            
            .custom-subtitle-input input {
                flex: 1;
            }
            
            .custom-subtitle-input button {
                background: #dc3545;
                color: white;
                border: none;
                width: 30px;
                height: 30px;
                border-radius: 50%;
                font-size: 1.1rem;
                cursor: pointer;
                display: flex;
                align-items: center;
                justify-content: center;
                transition: background-color 0.2s;
            }
            
            .custom-subtitle-input button:hover {
                background: #c82333;
            }

            /* Posts page styles */
            .back-link {
                margin-bottom: 2rem;
            }
            
            .back-link a {
                color: var(--accent-color);
                text-decoration: none;
                font-weight: 500;
            }
            
            .back-link a:hover {
                text-decoration: underline;
            }

            .home-link {
                color: inherit !important;
                text-decoration: none !important;
            }

            /* Posts page specific styles */
            .page-post .items {
                width: auto;
                height: auto;
            }

            /* Responsive Design - Mobile First Approach */
            
            /* Base mobile styles (up to 480px) */
            @media (max-width: 480px) {
                html {
                    margin: 0.5em;
                    font-size: 13px;
                }
                
                .box {
                    justify-content: center;
                }
                
                .items {
                    width: 100%;
                    max-width: 320px;
                    margin-right: 0;
                    margin-bottom: 1em;
                }
                
                .wide {
                    width: 100%;
                    max-width: 320px;
                }
                
                .form-container {
                    padding: 1em;
                    margin: 0;
                    max-width: 100%;
                }
                
                .modal-content {
                    margin: 10% auto;
                    width: 95%;
                    padding: 15px;
                }
                
                .subtitle-selector {
                    flex-direction: column;
                    gap: 0.25rem;
                }
                
                .subtitle-selector select {
                    width: 100%;
                }
                
                .form-group input,
                .form-group textarea,
                .form-group select {
                    font-size: 16px; /* Prevents zoom on iOS */
                }
                
                .tag {
                    font-size: 0.75em;
                    padding: 0.15em 0.4em;
                }
            }
            
            /* Tablet styles (481px to 768px) */
            @media (min-width: 481px) and (max-width: 768px) {
                html {
                    margin: 1em;
                    font-size: 13px;
                }
                
                .box {
                    justify-content: space-around;
                }
                
                .items {
                    width: 280px;
                    margin-right: 0.25em;
                    margin-left: 0.25em;
                }
                
                .wide {
                    width: 100%;
                    max-width: 580px;
                }
                
                .form-container {
                    max-width: 400px;
                }
                
                .modal-content {
                    width: 85%;
                }
                
                .form-layout {
                    grid-template-columns: 1fr;
                }
            }
            
            /* Small desktop/large tablet (769px to 1024px) */
            @media (min-width: 769px) and (max-width: 1024px) {
                .box {
                    justify-content: flex-start;
                }
                
                .items {
                    width: 240px;
                }
                
                .wide {
                    width: 490px;
                }
            }
            
            /* Large desktop (1025px and up) */
            @media (min-width: 1025px) {
                .items {
                    width: 250px;
                }
                
                .wide {
                    width: 500px;
                }
            }
            
            /* Landscape orientation adjustments for mobile */
            @media (max-width: 768px) and (orientation: landscape) {
                .items {
                    width: 45%;
                    min-width: 280px;
                }
                
                .wide {
                    width: 95%;
                }
            }
            
            /* High DPI display adjustments */
            @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
                .items {
                    border-width: 0.5px;
                }
                
                .tag {
                    border-width: 0.5px;
                }
            }
            
            /* Print styles */
            @media print {
                html {
                    margin: 0;
                    background-color: white;
                }
                
                .items {
                    border: 1px solid #000;
                    break-inside: avoid;
                    margin-bottom: 1em;
                }
                
                .tag {
                    background: none;
                    border: 1px solid #000;
                }
                
                .form-container,
                .modal,
                button {
                    display: none;
                }
            }
            
            /* Accessibility improvements */
            @media (prefers-reduced-motion: reduce) {
                * {
                    animation-duration: 0.01ms !important;
                    animation-iteration-count: 1 !important;
                    transition-duration: 0.01ms !important;
                }
            }