/*!
 * Mythos Theme for Micro.blog
 * A minimal, fast, and readable black and white theme
 * 
 * Author: Matt Langford
 * Website: https://mattlangford.com
 * Repository: https://github.com/mattlangford/mythos-theme
 * License: MIT License
 * Version: 1.1.2
 * 
 * CUSTOMIZATION TIP: Do not modify this file directly. Instead use Micro.blog's Custom CSS feature.
 * If you modify (or overwrite) this file, it will be reversed when a new update for the theme is released.
 * Use this file as a guide, but only include the specific things you want to change in your Custom CSS.
 */

/* ===== THEME CUSTOMIZATION VARIABLES =====
 * Change these values to customize your theme colors, fonts, and spacing.
 * All changes here will automatically apply throughout your entire site.
 */
:root {
    /* COLORS - Light Mode Default
     * Change these hex color codes to customize your theme colors.
     * Example: Change --color-text to #333333 for softer black text */
    --color-text: #000000;              /* Main text color */
    --color-text-light: #333333;        /* Slightly lighter text for less emphasis */
    --color-text-muted: #666666;        /* Muted text for timestamps, meta info */
    --color-background: #ffffff;        /* Main page background */
    --color-background-alt: #f8f9fa;    /* Background for code blocks, cards, forms */
    --color-border: #e1e5e9;           /* Borders around elements */
    --color-border-light: #f1f3f4;     /* Lighter borders for subtle dividers */
    --color-link: #555555;             /* Link color */
    --color-link-hover: #000000;       /* Link color when hovering */
    --color-accent: #666666;           /* Accent color for focus states, buttons */
    
    /* TYPOGRAPHY 
     * Controls all text appearance throughout your site.
     * Tip: Change --font-size-base to make all text larger or smaller (18px is default) */
    --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Liberation Sans", FreeSans, sans-serif;  /* Main text font - uses system fonts for best performance */
    --font-family-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Liberation Mono", "Courier New", monospace;  /* Code font */
    --font-size-base: 18px;             /* Base text size - increase for larger text site-wide */
    --font-size-large: 20px;            /* Large text size */
    --font-size-small: 16px;            /* Small text size */
    --font-size-xs: 14px;               /* Extra small text size */
    --line-height-base: 1.6;            /* Normal line spacing (1.6 = comfortable reading) */
    --line-height-tight: 1.4;           /* Tight line spacing for headlines */
    --line-height-loose: 1.8;           /* Loose line spacing for post content */
    
    /* SPACING 
     * Controls margins, padding, and gaps throughout your site.
     * Tip: Increase these values for more spacious design, decrease for more compact */
    --spacing-xs: 0.25rem;              /* Extra small spacing (4px) */
    --spacing-sm: 0.5rem;               /* Small spacing (8px) */
    --spacing-md: 1rem;                 /* Medium spacing (16px) */
    --spacing-lg: 1.5rem;               /* Large spacing (24px) */
    --spacing-xl: 2rem;                 /* Extra large spacing (32px) */
    --spacing-2xl: 3rem;                /* 2X large spacing (48px) */
    --spacing-3xl: 4rem;                /* 3X large spacing (64px) */
    
    /* LAYOUT 
     * Controls the width of your content and key measurements. */
    --container-width: 42rem;           /* Main content width (672px) - perfect for readability */
    --container-width-wide: 48rem;      /* Wider content width for special pages */
    --header-height: 4rem;              /* Height of site header */
    --touch-target-height: 44px;        /* Minimum button/link size for mobile accessibility */
    --button-padding: var(--spacing-md) var(--spacing-lg);         /* Standard button padding */
    --button-padding-compact: var(--spacing-sm) var(--spacing-md); /* Smaller button padding */
    
    /* ANIMATIONS 
     * Controls how fast hover effects and transitions happen.
     * Tip: Set these to 0s if you prefer no animations */
    --transition-fast: 0.15s ease;      /* Quick transitions for subtle effects */
    --transition-base: 0.2s ease;       /* Standard transition speed */
    --transition-slow: 0.3s ease;       /* Slower transitions for prominent effects */
}

/* ===== DARK MODE =====
 * Automatically activates when user's device is set to dark mode.
 * These colors override the light mode colors above.
 * Tip: Customize these colors to create your perfect dark mode experience. */
@media (prefers-color-scheme: dark) {
    :root {
        /* DARK MODE COLORS
         * Note: These use softer colors than pure black/white for better eye comfort */
        --color-text: #e5e5e5;              /* Light gray text instead of pure white */
        --color-text-light: #cccccc;        /* Slightly darker for less emphasis */
        --color-text-muted: #999999;        /* Muted gray for timestamps, meta info */
        --color-background: #1a1a1a;        /* Dark gray background (not pure black) */
        --color-background-alt: #2a2a2a;    /* Lighter dark gray for code blocks, cards */
        --color-border: #404040;            /* Medium gray borders */
        --color-border-light: #333333;      /* Subtle gray borders */
        --color-link: #aaaaaa;              /* Light gray links */
        --color-link-hover: #e5e5e5;        /* Brighter on hover */
        --color-accent: #888888;            /* Medium gray accent */
    }
    
    /* SPECIAL CONTENT BLOCKS in Dark Mode
     * These override the light mode versions for better dark mode contrast */
    p.note {        /* Blue informational blocks */
        background-color: #1a2533;
        border-color: #2d4a5c;
        border-left-color: #4a90cc;
        color: #b3d7f0;
    }
    
    p.alert {       /* Yellow warning blocks */
        background-color: #332914;
        border-color: #5c4a1a;
        border-left-color: #cc9944;
        color: #f0d9a3;
    }
    
    p.aside {       /* Gray sidebar-style blocks */
        background-color: #2a2a2a;
        border-color: #404040;
        border-left-color: #777777;
        color: #cccccc;
    }
    
    /* IMAGES in Dark Mode
     * Add subtle border so images stand out from dark background */
    img {
        border: 1px solid var(--color-border-light);
    }
    
    /* CODE BLOCKS in Dark Mode 
     * Dark theme for code and syntax highlighting */
    code {          /* Inline code */
        background-color: #2d2d2d;
        border-color: var(--color-border);
        color: #e5e5e5;
    }
    
    pre {           /* Code blocks */
        background-color: #2d2d2d;
        border-color: var(--color-border);
        color: #e5e5e5;
    }
    
    /* HIGHLIGHT element in Dark Mode */
    highlight, mark {
        background-color: #4a4a00;     /* Darker yellow background for dark mode */
        color: #ffffff;                /* White text for contrast */
    }
}

/* ===== SMOOTH TRANSITIONS =====
 * Makes dark/light mode switching smooth and pleasant.
 * All elements transition their colors when mode changes. */
*, *::before, *::after {
    transition: background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}

/* ===== ACCESSIBILITY: REDUCED MOTION =====
 * Respects user preference for reduced motion (important for vestibular disorders).
 * When user has "reduce motion" enabled, all animations become nearly instant. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== FOUNDATIONAL STYLES =====
 * These establish the basic behavior and appearance for your entire site.
 * Generally, you won't need to modify these unless you want advanced customization. */

/* Reset browser defaults and use modern box model */
*,
*::before,
*::after {
    box-sizing: border-box;  /* Makes width/height calculations more predictable */
}

/* Set up base font size and text rendering */
html {
    font-size: var(--font-size-base);     /* Base font size for your site */
    line-height: var(--line-height-base); /* Comfortable line spacing for reading */
    -webkit-text-size-adjust: 100%;       /* Prevents text scaling issues on mobile */
}

/* Main page setup - this controls your overall site appearance */
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family-base);  /* Uses the font defined in variables above */
    color: var(--color-text);              /* Main text color */
    background-color: var(--color-background);  /* Page background color */
    -webkit-font-smoothing: antialiased;   /* Makes text look crisp on Apple devices */
    -moz-osx-font-smoothing: grayscale;    /* Makes text look crisp on Firefox/Mac */
    letter-spacing: 0.01em;                /* Subtle letter spacing for improved readability */
    transition: background-color var(--transition-base), color var(--transition-base);  /* Smooth dark mode transitions */
}

/* ===== TYPOGRAPHY =====
 * Controls the appearance of all text elements.
 * Tip: To change font sizes site-wide, modify the --font-size variables at the top. */

/* Headlines (h1, h2, h3, h4, h5, h6)
 * These control your blog post titles and section headings */
h1, h2, h3, h4, h5, h6 {
    margin: var(--spacing-xl) 0 var(--spacing-md);  /* Space above and below headings */
    font-weight: 600;                               /* Semi-bold weight for good contrast */
    line-height: var(--line-height-tight);          /* Tighter line spacing for headlines */
    color: var(--color-text);                       /* Same color as body text */
}

/* Remove extra space above the first heading in a section */
h1:first-child,
h2:first-child,
h3:first-child {
    margin-top: 0;
}

/* Specific heading sizes - change these to adjust hierarchy
 * Tip: rem units scale with your base font size */
h1 { font-size: 2rem; }      /* Largest - usually post titles */
h2 { font-size: 1.5rem; }    /* Major sections */
h3 { font-size: 1.25rem; }   /* Subsections */
h4 { font-size: 1.1rem; }    /* Minor headings */
h5 { font-size: 1rem; }      /* Same as body text but bold */
h6 { font-size: 0.9rem; }    /* Smallest heading */

/* Paragraphs - your main text content */
p {
    margin: 0 0 var(--spacing-md);  /* Space below each paragraph */
}

/* Remove space below the last paragraph in a section */
p:last-child {
    margin-bottom: 0;
}

/* ===== SPECIAL CONTENT BLOCKS =====
 * Use these classes in your posts for styled content blocks.
 * Example: <p class="note">This is an informational note.</p> */

/* Blue informational blocks - use for tips, notes, helpful information */
p.note {
    background-color: #e8f4fd;        /* Light blue background */
    border: 1px solid #bee5eb;        /* Blue border */
    border-left: 4px solid #007acc;   /* Thick left border for emphasis */
    padding: var(--spacing-md);       /* Internal spacing */
    margin: var(--spacing-lg) 0;      /* Space above and below */
    border-radius: 5px;               /* Rounded corners */
    font-weight: 600;                 /* Bold text */
    color: #084248;                   /* Dark blue text */
}

/* Yellow warning blocks - use for warnings, important notices */
p.alert {
    background-color: #fff3cd;        /* Light yellow background */
    border: 1px solid #ffeaa7;        /* Yellow border */
    border-left: 4px solid #f39c12;   /* Thick orange left border */
    padding: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    border-radius: 5px;
    font-weight: 600;
    color: #6b4f03;                   /* Dark orange text */
}

/* Gray sidebar-style blocks - use for additional info, asides */
p.aside {
    background-color: #f8f9fa;        /* Light gray background */
    border: 1px solid #dee2e6;        /* Gray border */
    border-left: 4px solid #6c757d;   /* Thick gray left border */
    padding: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    border-radius: 5px;
    font-weight: 600;
    color: #495057;                   /* Dark gray text */
}

/* ===== LINKS =====
 * Controls how all links appear and behave throughout your site. */

/* Default link appearance */
a {
    color: var(--color-link);              /* Link color from variables */
    text-decoration: underline;            /* Always show underlines for accessibility */
    text-underline-offset: 0.2em;          /* Space between text and underline */
    text-decoration-thickness: 1px;        /* Thin underline by default */
    transition: color var(--transition-fast);  /* Smooth color change on hover */
}

/* Link hover state - when mouse hovers over link */
a:hover {
    color: var(--color-link-hover);        /* Different color on hover */
    text-decoration-thickness: 2px;        /* Thicker underline on hover */
}

/* Link focus state - when keyboard user tabs to link (accessibility) */
a:focus {
    outline: 2px solid var(--color-accent);  /* Visible outline for keyboard users */
    outline-offset: 2px;                     /* Space between text and outline */
}

/* Footnote links - remove underlines for cleaner appearance */
a[href^="#fn:"],           /* Inline footnote reference links */
a[href^="#fnref:"],        /* Return links from footnotes */
.footnote-ref,             /* Alternative footnote reference class */
.footnote-backref {        /* Alternative footnote return class */
    text-decoration: none; /* Remove underline from footnote links */
}

/* Add subtle hover effect for footnote links */
a[href^="#fn:"]:hover,
a[href^="#fnref:"]:hover,
.footnote-ref:hover,
.footnote-backref:hover {
    text-decoration: underline;        /* Show underline on hover for clarity */
    text-decoration-thickness: 1px;    /* Thin underline */
}

/* Lists */
ul, ol {
    margin: 0 0 var(--spacing-md);
    padding-left: var(--spacing-lg);
}

li {
    margin-bottom: var(--spacing-xs);
}

/* ===== TABLES =====
 * Clean, readable table styling that matches the theme design. */

table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-lg) 0;
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
}

/* Table headers */
th {
    background-color: var(--color-background-alt);
    color: var(--color-text);
    font-weight: 600;
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: left;
    border-bottom: 2px solid var(--color-border);
    border-right: 1px solid var(--color-border-light);
}

th:last-child {
    border-right: none;
}

/* Table cells */
td {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--color-border-light);
    border-right: 1px solid var(--color-border-light);
}

td:last-child {
    border-right: none;
}

/* Zebra striping for better readability */
tbody tr:nth-child(even) {
    background-color: var(--color-background-alt);
}

/* Hover effect on table rows */
tbody tr:hover {
    background-color: var(--color-background-alt);
    transition: background-color var(--transition-fast);
}

/* Responsive table wrapper for mobile */
.table-wrapper {
    overflow-x: auto;
    margin: var(--spacing-lg) 0;
    border: 1px solid var(--color-border-light);
    border-radius: 5px;
}

/* Images */
img {
    width: 100%;
    height: auto;
    display: block;
    margin: var(--spacing-md) 0;
    border-radius: 5px;
}

/* Note: For lazy loading, users should add loading="lazy" to img tags in content.
   Avatar images in header should NOT use lazy loading as they're above-the-fold. */

/* Videos */
video {
    width: 100%;
    height: auto;
    display: block;
    margin: var(--spacing-md) 0;
    border-radius: 5px;
}


img.half-width {
    width: 50%;
    max-width: 50%;
    margin: var(--spacing-md) auto;
}

img.small {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    margin: var(--spacing-sm);
}

img.frame {
    border: 8px solid var(--color-background-alt);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: var(--spacing-lg) 0;
}

/* ===== SPECIAL IMAGE CLASSES =====
 * Add these classes to images in your posts for different effects.
 * Example: <img src="photo.jpg" class="full-width" alt="Description"> */

/* Full-width images that break out of the normal content width
 * Great for hero images, wide screenshots, landscape photos */
img.full-width,
figure.full-width {
    width: 100vw;                /* Full viewport width */
    max-width: 1200px;           /* But not bigger than 1200px */
    margin-left: 50%;            /* Center positioning trick... */
    transform: translateX(-50%); /* ...moves it back to true center */
}

/* Remove rounded corners from full-width images when they reach browser edge */
img.full-width {
    border-radius: 0;            /* No rounded corners for full-width images */
}

/* Figure captions - centered styling for image descriptions */
figcaption {
    text-align: center;                     /* Center the caption text */
    font-size: var(--font-size-small);     /* Smaller text size */
    color: var(--color-text-muted);        /* Muted color for subtlety */
    font-style: italic;                     /* Italic styling for elegance */
    margin-top: var(--spacing-sm);         /* Space above caption */
    padding: 0 var(--spacing-md);          /* Side padding for narrow screens */
    line-height: var(--line-height-base);  /* Standard line height */
}

/* Code */
code {
    font-family: var(--font-family-mono);
    font-size: 0.9em;
    background-color: var(--color-background-alt);
    padding: 0.15em 0.3em;
    border-radius: 5px;
    border: 1px solid var(--color-border-light);
}

pre {
    font-family: var(--font-family-mono);
    font-size: 0.85em;
    background-color: var(--color-background-alt);
    padding: var(--spacing-md);
    border-radius: 5px;
    border: 1px solid var(--color-border);
    overflow-x: auto;
    margin: var(--spacing-lg) 0;
    line-height: var(--line-height-tight);
}

pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
}

/* Highlight element - for text highlighting/marking */
highlight, mark {
    background-color: #fff3cd;          /* Soft yellow background */
    color: var(--color-text);           /* Keep text readable */
    padding: 0.1em 0.2em;               /* Subtle padding */
    border-radius: 3px;                 /* Rounded corners */
    font-weight: 500;                   /* Slightly bold for emphasis */
}

/* Abbreviation element - for acronyms and abbreviations */
abbr {
    text-decoration: underline dotted;   /* Dotted underline indicates abbreviation */
    text-underline-offset: 0.2em;       /* Space between text and underline */
    cursor: help;                       /* Help cursor indicates more info available */
    font-variant: small-caps;           /* Small caps for professional appearance */
    letter-spacing: 0.05em;             /* Slight letter spacing for readability */
}

/* Blockquotes */
blockquote {
    margin: var(--spacing-xl) 0;
    padding: var(--spacing-md) var(--spacing-lg);
    border-left: 4px solid var(--color-border);
    background-color: var(--color-background-alt);
    font-style: italic;
    color: var(--color-text-light);
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* ===== LAYOUT COMPONENTS =====
 * These control the major sections of your site layout.
 * Generally you won't need to modify these unless you want structural changes. */

/* ===== SITE HEADER =====
 * The top navigation bar that contains your site title and menu */
.site-header {
    background-color: var(--color-background);   /* Header background color */
    border-bottom: 1px solid var(--color-border); /* Line under header */
    position: sticky;                            /* Header sticks to top when scrolling */
    top: 0;                                      /* Sticks to very top */
    z-index: 100;                               /* Appears above other content */
    backdrop-filter: blur(10px);                /* Blur effect for modern browsers */
    -webkit-backdrop-filter: blur(10px);        /* Blur effect for Safari */
}

.header-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
}

.site-branding {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}


.site-info {
    min-width: 0;
}

.site-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
}

.title-avatar {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    margin: 0;
    flex-shrink: 0;
}

.site-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.site-title a:hover {
    color: var(--color-link);
}


/* ===== NAVIGATION MENU =====
 * The dropdown menu that appears when clicking the menu button.
 * Features automatic 2-column layout when you have 6+ menu items. */
.site-navigation {
    position: relative;  /* Needed for dropdown positioning */
}

.menu-toggle {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    padding: var(--spacing-sm) var(--spacing-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
}

.menu-toggle:hover {
    border-color: var(--color-accent);
    color: var(--color-text);
}

.menu-toggle-text {
    font-weight: 500;
}

.hamburger {
    display: flex;
    flex-direction: column;
    width: 18px;
    height: 14px;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: currentColor;
    transition: all var(--transition-fast);
    transform-origin: center;
}

.menu-toggle[aria-expanded="true"] .hamburger span:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger span:last-child {
    transform: rotate(-45deg) translate(5px, -5px);
}

.primary-menu {
    position: absolute;
    top: calc(100% + var(--spacing-sm));
    right: 0;
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    z-index: 1000;
    display: none;
}

.primary-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: block;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: var(--spacing-sm) 0;
    min-width: 200px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

/* SMART 2-COLUMN LAYOUT: Automatically switches to 2 columns when you have 6+ menu items
 * This keeps your navigation compact even with many menu items */
.nav-menu:has(.nav-item:nth-child(6)) {
    grid-template-columns: 1fr 1fr;  /* Two equal columns */
    min-width: 360px;                /* Wider to accommodate columns */
    gap: 0;
}

/* FALLBACK for older browsers that don't support :has() selector
 * Provides same 2-column behavior using flexbox instead of grid */
@supports not (selector(:has(*))) {
    .nav-menu {
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;       /* Items wrap to create columns */
        max-height: 300px;     /* Forces wrapping at this height */
        min-width: 360px;
    }
    
    .nav-item {
        flex: 0 0 auto;
        width: 50%;           /* Each item takes half width = 2 columns */
    }
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    min-height: 44px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-link:hover,
.nav-link.current {
    color: var(--color-text);
    background-color: var(--color-background-alt);
}

.nav-link:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Main Content */
.main-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--spacing-2xl) var(--spacing-lg);
}

/* Home Page */
.home-content {
    max-width: 100%;
}



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

.post-item {
    margin-bottom: var(--spacing-2xl);
    padding-bottom: var(--spacing-2xl);
    border-bottom: 1px solid var(--color-border-light);
}

.post-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.post-header {
    margin-bottom: var(--spacing-md);
}

.post-title {
    margin: 0 0 var(--spacing-sm);
    font-size: 1.5rem;
    line-height: var(--line-height-tight);
}

.post-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.post-title a:hover {
    color: var(--color-link);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
    margin: var(--spacing-sm) 0;
}

.post-meta time {
    font-weight: 500;
}

.post-date-link {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

.post-date-link:hover {
    color: var(--color-link);
}


.post-content {
    font-size: var(--font-size-base);
    line-height: var(--line-height-loose);
    margin-bottom: var(--spacing-md);
}

/* Single Post */
.post {
    max-width: 100%;
}

.post-footer {
    margin-top: var(--spacing-3xl);
    padding-top: var(--spacing-2xl);
    border-top: 1px solid var(--color-border);
}

.empty-list {
    text-align: center;
    padding: var(--spacing-3xl) 0;
    color: var(--color-text-muted);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-xl);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.prev-page,
.next-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md) var(--spacing-lg);
    min-height: 44px;
    background-color: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-radius: 5px;
    text-decoration: none;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: var(--font-size-small);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.prev-page:hover,
.next-page:hover {
    color: var(--color-text);
    border-color: var(--color-accent);
    transform: translateY(-1px);
}

.page-numbers {
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
    font-weight: 500;
}

/* Footer */
.site-footer {
    background-color: var(--color-background);
    border-top: 1px solid var(--color-border);
    margin-top: var(--spacing-3xl);
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--spacing-2xl) var(--spacing-lg);
    text-align: center;
}

.footer-content {
    margin-bottom: var(--spacing-lg);
}

.powered-by {
    margin: var(--spacing-sm) 0;
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
}

/* Horizontal Rules */
hr {
    border: none;
    height: 1px;
    background-color: var(--color-border-light);
    margin: var(--spacing-2xl) 0;
    opacity: 0.7;
}

/* Buttons and Form Elements */
button, .button, input[type="submit"], input[type="button"],
.post-actions a, .post-actions button,
.archive-categories .category-button,
.prev-page, .next-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--touch-target-height);
    background-color: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-radius: 5px;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

/* Standard button padding */
button, .button, input[type="submit"], input[type="button"],
.post-actions a, .post-actions button,
.archive-categories .category-button,
.prev-page, .next-page,
.microblog_reply_button input[type="submit"] {
    padding: var(--button-padding);
    font-size: var(--font-size-small);
}

/* Compact button padding for inline elements */
.post-categories .category-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--button-padding-compact);
    min-height: 36px;
    background-color: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-radius: 5px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: var(--font-size-xs);
    font-weight: 600;
    transition: all var(--transition-fast);
}

/* Button hover states */
button:hover, .button:hover, input[type="submit"]:hover, input[type="button"]:hover,
.post-actions a:hover, .post-actions button:hover,
.archive-categories .category-button:hover,
.prev-page:hover, .next-page:hover,
.post-categories .category-button:hover,
.microblog_reply_button input[type="submit"]:hover:not(:disabled) {
    background-color: var(--color-background);
    border-color: var(--color-accent);
    color: var(--color-text);
    transform: translateY(-1px);
}

/* Button focus states */
button:focus, .button:focus, input[type="submit"]:focus, input[type="button"]:focus,
.post-actions a:focus, .post-actions button:focus,
.archive-categories .category-button:focus,
.prev-page:focus, .next-page:focus,
.post-categories .category-button:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Accommodate nested buttons in links when this is incorrectly used in html */
a button, a .button {
    margin: 0;
}

/* Form Elements */
input[type="text"], input[type="email"], input[type="search"], 
input[type="url"], input[type="password"], textarea, select {
    display: inline-block;
    padding: var(--button-padding);
    min-height: var(--touch-target-height);
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 5px;
    color: var(--color-text);
    font-family: inherit;
    font-size: var(--font-size-small);
    line-height: 1;
    transition: border-color var(--transition-fast);
    width: 100%;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="search"]:focus,
input[type="url"]:focus, input[type="password"]:focus, textarea:focus, select:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-color: var(--color-accent);
}

/* Search Space Plugin Specific */
#search-space-form {
    margin-bottom: var(--spacing-xl);
}

#search-space-form p {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    align-items: flex-end;
}

#search-space-form label {
    flex-basis: 100%;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
}

#search-space-form input[type="search"] {
    flex: 1;
    min-width: 200px;
}

#search-space-form button {
    flex-shrink: 0;
}

/* Microblog Conversation/Comments */
#conversation {
    margin-top: var(--spacing-2xl);
    background: transparent;
}

.microblog_conversation {
    margin: var(--spacing-lg) 0;
}

.microblog_post {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    background-color: var(--color-background);
    border: 1px solid var(--color-border-light);
    border-radius: 5px;
    transition: border-color var(--transition-fast);
}

.microblog_post:hover {
    border-color: var(--color-border);
}

.microblog_post:last-child {
    margin-bottom: 0;
}

.microblog_user {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.microblog_avatar {
    width: 1.75rem !important;
    height: 1.75rem !important;
    max-width: 1.75rem !important;
    border-radius: 50%;
    border: 1px solid var(--color-border-light);
}

.microblog_fullname {
    font-weight: 600;
    color: var(--color-text);
    font-size: var(--font-size-small);
}

.microblog_text {
    color: var(--color-text-light);
    line-height: var(--line-height-base);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-base);
}

.microblog_text p {
    margin: 0;
}

.microblog_time {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    font-weight: 500;
}

.microblog_time a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* Reply Form */
.microblog_reply_form {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background-color: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-radius: 5px;
}

.microblog_reply_signin {
    margin: 0 0 var(--spacing-sm);
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
}

.microblog_reply_signin a {
    color: var(--color-link);
    font-weight: 500;
}

.microblog_reply_textarea textarea {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--color-border);
    border-radius: 5px;
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    resize: vertical;
}

.microblog_reply_button {
    margin: var(--spacing-sm) 0 0;
}

.microblog_reply_button input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md) var(--spacing-lg);
    min-height: 44px;
    background-color: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-radius: 5px;
    color: var(--color-text);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.microblog_reply_button input[type="submit"]:hover:not(:disabled) {
    background-color: var(--color-background);
    border-color: var(--color-accent);
}

.microblog_reply_button input[type="submit"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Category Description/Intro */
.microblog-category-intro {
    padding-bottom: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--color-border-light);
    color: var(--color-text-light);
    font-size: var(--font-size-large);
    line-height: var(--line-height-loose);
}

/* Post Categories */
.post-categories {
    margin: var(--spacing-xl) 0;
}

.post-categories .category-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.post-categories .category-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-md);
    min-height: 36px;
    background-color: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-radius: 5px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: capitalize;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.post-categories .category-button:hover {
    color: var(--color-text);
    border-color: var(--color-accent);
    background-color: var(--color-background);
}

.post-categories .category-button:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Post Actions (Plugin Buttons) */
.post-actions {
    margin-bottom: var(--spacing-xl);
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* Post actions styling inherits from consolidated button styles above */
.post-actions a,
.post-actions button {
    white-space: nowrap;
}

/* Copy link button specific styling */
.copy-link-button {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.copy-link-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.copy-link-button.copied::after {
    content: attr(data-copied-text);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-background-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* Archive Page Sections */
.archive-section {
    margin-bottom: var(--spacing-2xl);
}

.archive-categories {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    list-style: none;
    margin: 0;
    padding: 0;
}

.archive-categories li {
    margin: 0;
}

/* Archive category buttons inherit from consolidated button styles above */
.archive-categories .category-button {
    text-transform: capitalize;
    white-space: nowrap;
}

/* Archive Posts List - compact layout for all posts */
.archive-posts-list {
    margin-top: var(--spacing-xl);
}

.archive-post-item {
    display: flex;                          /* Side-by-side layout */
    align-items: flex-start;                /* Align items to top */
    gap: var(--spacing-lg);                 /* Space between date and content */
    padding: var(--spacing-md) 0;          /* Vertical spacing */
    border-bottom: 1px solid var(--color-border-light);  /* Subtle divider */
}

.archive-post-item:last-child {
    border-bottom: none;                    /* No border on last item */
}

.archive-post-date {
    flex-shrink: 0;                         /* Don't shrink date column */
    min-width: 140px;                       /* Consistent date column width */
}

.archive-date-link {
    font-size: var(--font-size-small);     /* Smaller date text */
    color: var(--color-text-muted);        /* Muted color */
    text-decoration: none;                  /* Clean appearance */
    font-weight: 500;                       /* Slightly bold for readability */
}

.archive-date-link:hover {
    color: var(--color-link-hover);        /* Highlight on hover */
    text-decoration: underline;             /* Show underline on hover */
}

.archive-post-content {
    flex: 1;                                /* Take remaining space */
    min-width: 0;                          /* Allow text truncation */
}

.archive-post-title {
    font-size: var(--font-size-base);      /* Standard font size */
    font-weight: 600;                       /* Semi-bold weight */
    margin: 0;                              /* Remove default margins */
    line-height: var(--line-height-tight); /* Tight line spacing */
    color: var(--color-text);              /* Standard text color */
}

.archive-post-summary {
    color: var(--color-text-light);        /* Lighter text for summaries */
    font-style: italic;                     /* Italicize micropost summaries */
    line-height: var(--line-height-base);  /* Standard line height */
}

/* Table horizontal scrolling for responsive design */
.table-wrapper {
    overflow-x: auto;                       /* Horizontal scroll when needed */
    margin: var(--spacing-lg) 0;           /* Standard table spacing */
    border-radius: 5px;                     /* Match theme border radius */
    border: 1px solid var(--color-border-light);  /* Subtle container border */
}

.table-wrapper table {
    margin: 0;                              /* Remove default margins inside wrapper */
    border: none;                           /* Remove border since wrapper has it */
}

/* Simple table constraint - prevent layout breaking */
table {
    max-width: 100%;                        /* Don't exceed container width */
}

/* Page Item Styling for Lists */
.page-item {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border-light);
}

.page-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.page-title {
    margin: 0 0 var(--spacing-sm);
    font-size: 1.25rem;
    line-height: var(--line-height-tight);
}

.page-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.page-title a:hover {
    color: var(--color-link);
}

.page-summary {
    color: var(--color-text-light);
    line-height: var(--line-height-loose);
}

/* ===== RESPONSIVE DESIGN =====
 * These rules make your site look great on tablets and phones.
 * They automatically activate based on screen size. */

/* TABLET AND MOBILE STYLES (screens 768px and smaller) */
@media (max-width: 768px) {
    :root {
        --font-size-base: 16px;      /* Slightly smaller text on mobile */
        --container-width: 100%;     /* Full width on mobile */
        --spacing-lg: 1rem;          /* Reduced spacing for smaller screens */
        --spacing-xl: 1.25rem;
        --spacing-2xl: 2rem;
        --spacing-3xl: 2.5rem;
        --button-padding-mobile: var(--spacing-md) var(--spacing-md);           /* Mobile button padding */
        --button-padding-compact-mobile: var(--spacing-sm) var(--spacing-md);   /* Compact mobile buttons */
    }
    
    /* Layout adjustments */
    .header-container {
        padding: var(--spacing-md) var(--spacing-md);
    }
    
    .main-content {
        padding: var(--spacing-xl) var(--spacing-md);
    }
    
    .site-title {
        font-size: 1.1rem;
    }
    
    /* Pagination mobile adjustments */
    .pagination {
        flex-direction: row;
        justify-content: space-between;
        gap: var(--spacing-sm);
        text-align: center;
    }
    
    .prev-page, .next-page {
        padding: var(--button-padding-mobile);
        font-size: var(--font-size-xs);
        flex: 0 1 auto;
        min-width: 0;
    }
    
    .page-numbers {
        flex: 0 0 auto;
        font-size: var(--font-size-xs);
    }
    
    /* Archive categories mobile adjustments */
    .archive-categories {
        gap: var(--spacing-xs);
    }
    
    .archive-categories .category-button {
        padding: var(--button-padding-compact-mobile);
        font-size: var(--font-size-xs);
    }
    
    /* Navigation mobile adjustments */
    .nav-menu:has(.nav-item:nth-child(6)) {
        min-width: 320px;
    }
    
    .nav-link {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: var(--font-size-small);
    }
    
    /* Table mobile adjustments */
    table {
        font-size: var(--font-size-small);
    }
    
    th, td {
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

/* SMALL MOBILE STYLES (screens 480px and smaller - phones in portrait) */
@media (max-width: 480px) {
    /* Make headings smaller on tiny screens */
    h1 { font-size: 1.75rem; }    /* Smaller main headings */
    h2 { font-size: 1.375rem; }   /* Smaller section headings */
    
    /* Hide menu button text on small screens to save space */
    .menu-toggle-text {
        display: none;  /* Only shows hamburger icon */
    }
    
    /* Profile photo adjustments */
    .profile-photo {
        width: 4rem;
        height: 4rem;
    }
    
    /* Navigation ultra-mobile adjustments */
    .nav-menu:has(.nav-item:nth-child(6)) {
        min-width: 280px;
    }
    
    .nav-link {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-small);
    }
    
    /* Archive posts mobile layout */
    .archive-post-item {
        flex-direction: column;                 /* Stack date above content */
        gap: var(--spacing-xs);                /* Smaller gap when stacked */
        align-items: flex-start;               /* Left-align everything */
    }
    
    .archive-post-date {
        min-width: auto;                       /* Remove fixed width */
        margin-bottom: var(--spacing-xs);     /* Space below date */
    }
    
    .archive-date-link {
        font-size: var(--font-size-xs);       /* Even smaller on mobile */
    }
}

/* Fix Micro.blog photo grid alignment */
.photos-grid-container {
    grid-template-columns: 1fr 1fr 1fr !important;
}

/* Override Micro.blog photo collection layout */
.microblog_collection {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: var(--spacing-md) !important;
    margin: var(--spacing-lg) 0 !important;
    line-height: normal !important;
    justify-content: unset !important;
    align-items: unset !important;
}

.microblog_collection img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 !important;
    object-fit: cover !important;
    border-radius: 5px !important;
    border: 1px solid var(--color-border-light) !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast) !important;
}

.microblog_collection img:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Mobile: 3 columns for photo collections */
@media (max-width: 768px) {
    .microblog_collection {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: var(--spacing-sm) !important;
    }
}