/* ====================================
   APPROVED THOUGHTS - MAIN STYLESHEET
   ====================================
   
   TABLE OF CONTENTS:
   1. CSS Variables (Customization)
   2. Reset & Base Styles
   3. Typography
   4. Layout Components
   5. Header & Navigation
   6. Main Content
   7. Post Cards
   8. Sidebar
   9. Footer
   10. Utility Classes
   ==================================== */

/* ====================================
   1. CSS VARIABLES (CUSTOMIZATION)
   ==================================== */
:root {
    /* --- COLORS --- */
    /* Primary Colors */
    --color-primary: #e74c3c;           /* Main brand color */
    --color-primary-dark: #005a9e;      /* Darker shade for hover */
    --color-primary-light: #4da3db;     /* Lighter shade */
    
    /* Standard Link Colors (following web conventions) */
    --color-link: #0066cc;              /* Standard blue for links */
    --color-link-hover: #004499;        /* Darker blue for hover */
    --color-link-visited: #551a8b;      /* Purple for visited links */
    
    /* Text Colors */
    --color-text: #333333;              /* Main text color */
    --color-text-light: #666666;        /* Secondary text */
    --color-text-muted: #999999;        /* Muted text */
    
    /* Background Colors */
    --color-bg: #ffffff;                /* Main background */
    --color-bg-secondary: #f8f9fa;     /* Secondary background */
    --color-bg-code: #f4f4f4;          /* Code block background */
    
    /* Border Colors */
    --color-border: #e0e0e0;            /* Main border color */
    --color-border-light: #f0f0f0;      /* Light border */
    
    /* Post Type Colors (now for text only, no backgrounds) */
    --color-type-post: #007acc;         /* Standard post */
    --color-type-linkList: #28a745;     /* Link list */
    --color-type-thoughtPiece: #6f42c1; /* Thought piece */
    --color-type-notes: #ff8c00;        /* Notes */
    
    /* --- TYPOGRAPHY --- */
    /* Modern Sans-Serif Font Stack */
    --font-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    --font-heading: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", Monaco, "Courier New", Courier, monospace;
    
    /* Font Sizes - Adjusted for better hierarchy */
    --font-size-base: 16px;             /* Base font size */
    --font-size-small: 0.9rem;          /* 14.4px - body text size */
    --font-size-xs: 0.8rem;             /* 12.8px - for metadata */
    --font-size-medium: 1rem;           /* 16px - for tags and read more */
    --font-size-large: 1.125rem;        /* 18px */
    --font-size-h1: 2.5rem;             /* 40px */
    --font-size-h2: 2rem;               /* 32px */
    --font-size-h3: 1.3rem;             /* 20.8px - smaller post titles */
    --font-size-h4: 1.25rem;            /* 20px */
    
    /* Line Heights */
    --line-height-base: 1.6;
    --line-height-heading: 1.3;
    --line-height-tight: 1.4;
    
    /* --- SPACING --- */
    --space-xs: 0.25rem;                /* 4px */
    --space-sm: 0.5rem;                 /* 8px */
    --space-md: 1rem;                   /* 16px */
    --space-lg: 1.5rem;                 /* 24px */
    --space-xl: 2rem;                   /* 32px */
    --space-xxl: 3rem;                  /* 48px */
    
    /* --- LAYOUT --- */
    /* Container Widths - Optimized for content readability */
    --container-max-width: 1200px;      /* Maximum site width */
    --content-max-width: 680px;         /* Main content column - optimized for 35-40% of screen */
    --sidebar-width: 280px;             /* Slightly narrower sidebar */
    --gap-content-sidebar: 50px;        /* Increased gap for better separation */
    
    /* Header Heights */
    --header-height: 70px;              /* Header height */
    --header-height-mobile: 60px;       /* Mobile header height */
    
    /* --- BORDERS & SHADOWS --- */
    --border-radius: 4px;               /* Default border radius */
    --border-radius-large: 8px;         /* Large border radius */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.1);
    
    /* --- TRANSITIONS --- */
    --transition-base: all 0.2s ease;
    --transition-slow: all 0.3s ease;
}

/* Import Inter font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Dark Mode Variables (optional - uncomment to enable) */
/*
@media (prefers-color-scheme: dark) {
    :root {
        --color-text: #e0e0e0;
        --color-text-light: #b0b0b0;
        --color-text-muted: #808080;
        --color-bg: #1a1a1a;
        --color-bg-secondary: #2a2a2a;
        --color-bg-code: #2d2d2d;
        --color-border: #404040;
        --color-border-light: #333333;
    }
}
*/

/* ====================================
   2. RESET & BASE STYLES
   ==================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: var(--line-height-base);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ====================================
   3. TYPOGRAPHY
   ==================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: var(--line-height-heading);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
h4 { font-size: var(--font-size-h4); }

p {
    margin-bottom: var(--space-md);
}

/* Standard web link styling */
a {
    color: var(--color-link);
    text-decoration: none;
    transition: var(--transition-base);
}

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

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

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

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

/* Code */
code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background-color: var(--color-bg-code);
    padding: 0.2em 0.4em;
    border-radius: var(--border-radius);
}

pre {
    font-family: var(--font-mono);
    background-color: var(--color-bg-code);
    padding: var(--space-md);
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin-bottom: var(--space-md);
}

pre code {
    background-color: transparent;
    padding: 0;
}

/* ====================================
   4. LAYOUT COMPONENTS
   ==================================== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.site-container {
    min-height: calc(100vh - var(--header-height) - 200px); /* Subtract header and footer */
    padding: var(--space-xl) 0;
}

.content-wrapper {
    display: flex;
    gap: var(--gap-content-sidebar);
    align-items: flex-start;
    justify-content: center;
}

.main-content {
    width: var(--content-max-width);
    max-width: var(--content-max-width);
}

/* Skip Link (Accessibility) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: var(--space-sm) var(--space-md);
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* ====================================
   5. HEADER & NAVIGATION
   ==================================== */
.site-header {
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    max-width: calc(var(--content-max-width) + var(--gap-content-sidebar) + var(--sidebar-width));
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Site Branding */
.site-branding {
    display: flex;
    align-items: center;
}

.site-logo {
    text-decoration: none;
    color: var(--color-text);
}

.site-title {
    font-size: var(--font-size-h3);
    margin: 0;
    font-weight: 700;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    position: relative;
    transition: var(--transition-base);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    transition: var(--transition-base);
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--space-lg);
}

.nav-link {
    color: var(--color-text);
    font-weight: 500;
    padding: var(--space-sm) 0;
    position: relative;
}

.nav-link:hover {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
}

.nav-link.active {
    color: var(--color-text);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-text);
}

/* ====================================
   6. MAIN CONTENT
   ==================================== */
.hero-section {
    text-align: center;
    padding: var(--space-xxl) 0;
    border-bottom: 1px solid var(--color-border-light);
    margin-bottom: var(--space-xxl);
}

.hero-title {
    font-size: var(--font-size-h1);
    margin-bottom: var(--space-md);
}

.hero-subtitle {
    font-size: var(--font-size-large);
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Remove the "Recent Posts" section title */
.section-title {
    display: none;
}

/* ====================================
   7. POST CARDS
   ==================================== */
.post-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-large);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    transition: var(--transition-base);
}

.post-card:hover {
    border-color: var(--color-border);
    box-shadow: var(--shadow-md);
}

/* Post Header */
.post-header {
    margin-bottom: var(--space-md);
}

.post-title {
    font-size: var(--font-size-h3);
    margin-bottom: var(--space-sm);
}

/* Post title links should remain black, not standard link blue */
.post-title a {
    color: var(--color-text);
}

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

.post-title a:visited {
    color: var(--color-text);
}

/* Post Meta */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-xs);
    color: var(--color-text-light);
}

.post-date {
    display: flex;
    align-items: center;
}

/* Add separator styling */
.post-meta-separator {
    color: var(--color-text-muted);
    font-weight: normal;
}

/* Post Type Badges - Now just colored text, no background */
.post-type {
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--color-type-post);
    /* Remove all the background styling */
}

.post-type-post {
    color: var(--color-type-post);
}

.post-type-linkList {
    color: var(--color-type-linkList);
}

.post-type-thoughtPiece {
    color: var(--color-type-thoughtPiece);
}

.post-type-notes {
    color: var(--color-type-notes);
}

/* Post Content */
.post-excerpt p,
.post-content-preview p,
.post-content p {
    margin-bottom: var(--space-md);
    line-height: var(--line-height-tight);
    font-size: var(--font-size-small);
}

/* Fix markdown rendering in post content */
.post-content ul,
.post-content ol {
    font-size: var(--font-size-small);
    margin: var(--space-md) 0;
    padding-left: var(--space-lg);
}

.post-content li {
    font-size: var(--font-size-small);
    margin-bottom: var(--space-md);
    line-height: var(--line-height-tight);
}

/* Ensure numbered lists have same spacing as bulleted lists */
.post-content ol li {
    font-size: var(--font-size-small);
    margin-bottom: var(--space-md);
    line-height: var(--line-height-tight);
}

/* ====================================
   FINAL BLOCKQUOTE STYLES - REPLACE EXISTING
   ==================================== */

/* Main blockquote styling with thick subtle border */
.post-content blockquote {
    border-left: 4px solid var(--color-link); /* Thick border using link blue - perfect for quoted content */
    background-color: var(--color-bg-secondary);
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-md) 0;
    border-radius: var(--border-radius);
    font-style: normal;
    color: var(--color-text); /* Normal text color for better readability */
    font-size: var(--font-size-small);
}

/* Medium paragraph spacing inside blockquotes */
.post-content blockquote p {
    font-size: var(--font-size-small);
    margin-bottom: var(--space-md); /* Medium spacing as requested */
    line-height: var(--line-height-tight);
}

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

.post-content blockquote p:first-child {
    margin-top: 0;
}

/* Empty paragraphs in blockquotes (for spacing between quote sections) */
.post-content blockquote p:empty {
    margin-bottom: var(--space-md);
    height: var(--space-xs);
}

/* Lists inside blockquotes */
.post-content blockquote ul,
.post-content blockquote ol {
    font-size: var(--font-size-small);
    margin: var(--space-md) 0;
    padding-left: var(--space-md);
}

.post-content blockquote li {
    font-size: var(--font-size-small);
    margin-bottom: var(--space-sm);
}

/* Styling for blockquotes inside list items */
.post-content li blockquote {
    margin-top: var(--space-md);
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    font-size: var(--font-size-small);
}

/* Footnotes styling */
.post-content .footnotes {
    margin-top: calc(var(--space-xl) / 2);
    padding-top: calc(var(--space-lg) / 2);
    border-top: 1px solid var(--color-border-light);
}

.post-content .footnotes h2,
.post-content .footnotes h3,
.post-content .footnotes h4 {
    display: none;
}

.post-content .footnotes ol {
    font-size: var(--font-size-xs);
    color: var(--color-text-light);
    margin: 0;
    padding-left: var(--space-lg);
    list-style-position: outside;
}

.post-content .footnotes li {
    font-size: var(--font-size-xs);
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    line-height: var(--line-height-tight);
    padding-bottom: 0;
    padding-top: 0;
}

.post-content .footnotes li p {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    display: inline;
    font-size: var(--font-size-xs);
}

/* Notes post type special styling */
.post-card-notes {
    background-color: var(--color-bg-secondary);
}

.post-card-notes .post-content-preview,
.post-card-notes .post-content {
    font-size: var(--font-size-small);
    line-height: var(--line-height-base);
}

/* Post Footer */
.post-footer {
    margin-top: var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* Tags on the left */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    order: 1;
}

/* Actions on the right */
.post-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    order: 2;
}

/* Post Actions (Copy Link, etc.) */
.post-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.copy-link-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius);
    font-size: var(--font-size-xs);
    color: var(--color-text-light);
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
    font-family: inherit;
}

.copy-link-btn:hover {
    background: var(--color-border-light);
    color: var(--color-text);
    border-color: var(--color-border);
}

.copy-link-btn:active {
    transform: translateY(1px);
}

.copy-link-btn.copied {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.copy-icon {
    font-size: 0.9em;
}

.copy-text {
    font-weight: 500;
}

/* Mobile responsive */
@media screen and (max-width: 768px) {
    .copy-link-btn {
        font-size: var(--font-size-xs);
        padding: var(--space-xs);
    }
    
    .copy-text {
        display: none; /* Hide text on mobile, show only icon */
    }
}

/* Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.tag {
    display: inline-block;
    color: var(--color-text-light);
    font-size: var(--font-size-small);
    transition: var(--transition-base);
    text-decoration: none;
}

.tag:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.tag:visited {
    color: var(--color-text-light);
}

.tag:visited:hover {
    color: var(--color-primary);
}

/* Read More Link */
.read-more {
    font-weight: 500;
    font-size: var(--font-size-medium);
    color: var(--color-link);
}

.read-more:hover {
    color: var(--color-link-hover);
    text-decoration: none;
}

.read-more:visited {
    color: var(--color-link-visited);
}

/* ====================================
   8. SIDEBAR
   ==================================== */
.sidebar {
    width: var(--sidebar-width);
    position: static;
}

.sidebar-section {
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background-color: var(--color-bg-secondary);
    border-radius: var(--border-radius-large);
}

.sidebar-title {
    font-size: var(--font-size-h4);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-border-light);
}

/* Recent Posts List */
.recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-post-item {
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border-light);
}

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

.recent-post-link {
    display: block;
    color: var(--color-link);
    font-size: var(--font-size-small);
    line-height: var(--line-height-tight);
}

.recent-post-link:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

.recent-post-link:visited {
    color: var(--color-link-visited);
}

.recent-post-title {
    display: block;
    font-weight: 500;
    transition: var(--transition-base);
}

.recent-post-date {
    display: none;
}

/* External Links List */
.external-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.external-link-item {
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border-light);
}

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

.external-link {
    display: block;
    color: var(--color-link);
    font-size: var(--font-size-small);
    line-height: var(--line-height-tight);
    transition: var(--transition-base);
    text-decoration: none;
}

.external-link:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

.external-link:visited {
    color: var(--color-link-visited);
}

.link-icon {
    display: none;
}

.link-text {
    flex: 1;
    font-weight: 500;
}

/* Search Form */
.search-form {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: var(--space-sm) var(--space-sm) var(--space-sm) 35px;
    border: 2px solid var(--color-border-light);
    border-radius: 20px;
    font-size: var(--font-size-small);
    font-family: inherit;
    transition: var(--transition-base);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-border);
    box-shadow: 0 0 0 3px rgba(224, 224, 224, 0.3);
}

.search-button {
    display: none; /* Hide the button since we're using icon inside input */
}

.search-icon {
    position: absolute;
    left: var(--space-sm);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-light);
    font-size: 0.9rem;
    pointer-events: none;
}

.search-button:hover {
    background-color: var(--color-text);
}

.search-icon {
    display: block;
    font-size: 1em;
}

/* ====================================
   9. PAGINATION
   ==================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
    margin-top: var(--space-xxl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border-light);
}

.pagination-prev,
.pagination-next {
    padding: var(--space-sm) var(--space-md);
    background-color: var(--color-bg-secondary);
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition-base);
}

.pagination-prev:hover:not(.disabled),
.pagination-next:hover:not(.disabled) {
    background-color: var(--color-text);
    color: white;
    text-decoration: none;
}

.pagination-prev.disabled,
.pagination-next.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: var(--color-text-muted);
}

.pagination-current {
    font-size: var(--font-size-small);
    color: var(--color-text-light);
}

/* ====================================
   10. FOOTER
   ==================================== */
.site-footer {
    background-color: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    padding: var(--space-xl) 0;
    margin-top: var(--space-xxl);
}

.footer-content {
    text-align: center;
}

.copyright {
    color: var(--color-text-light);
    margin-bottom: var(--space-sm);
}

.footer-links {
    color: var(--color-text-light);
}

.footer-links a {
    color: var(--color-text);
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--color-primary);
}

.separator {
    margin: 0 var(--space-sm);
    color: var(--color-text-muted);
}

/* ====================================
   11. UTILITY CLASSES
   ==================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* ====================================
   12. ANIMATIONS
   ==================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* ====================================
   13. PRINT STYLES
   ==================================== */
@media print {
    .site-header,
    .sidebar,
    .pagination,
    .site-footer,
    .search-form {
        display: none;
    }
    
    .content-wrapper {
        display: block;
    }
    
    .main-content {
        max-width: 100%;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        color: var(--color-text);
        text-decoration: underline;
    }
}

/* ====================================
   14. INDIVIDUAL POST STYLES
   ==================================== */
.post-full {
    max-width: var(--content-max-width);
}

.post-full .post-header {
    text-align: left;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border-light);
}

.post-full .post-title {
    font-size: var(--font-size-h3);
    margin-bottom: var(--space-md);
}

.post-full .post-content {
    font-size: var(--font-size-large);
    line-height: 1.8;
}

.post-full .post-content h2 {
    margin-top: var(--space-xxl);
    margin-bottom: var(--space-lg);
}

.post-full .post-content h3 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

.post-full .post-footer {
    margin-top: var(--space-xxl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border-light);
}

/* ====================================
   INLINE IMAGE SUPPORT - PROPERLY CONSTRAINED
   ==================================== */

/* Image Container */
.image-container {
    margin: var(--space-lg) 0;
    text-align: center;
    width: 100%;
    max-width: 100%;
    overflow: hidden; /* Prevent overflow */
}

/* Inline Images - Constrained to content width */
.inline-image {
    max-width: 100%;
    max-height: 500px; /* Prevent extremely tall images */
    width: auto;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    display: block;
    margin: 0 auto;
    object-fit: contain; /* Maintain aspect ratio */
}

/* Ensure images within post content are constrained */
.post-content .image-container {
    max-width: 100%;
}

.post-content .inline-image {
    max-width: 100%;
    width: auto;
}

/* For very wide images, ensure they don't break layout */
.main-content .image-container {
    max-width: var(--content-max-width);
}

.main-content .inline-image {
    max-width: 100%;
    width: auto;
}

.inline-image:hover {
    box-shadow: var(--shadow-md);
    transform: scale(1.02); /* Subtle zoom on hover */
}

/* Image Captions */
.image-caption {
    margin-top: var(--space-sm);
    font-size: var(--font-size-xs);
    color: var(--color-text-light);
    font-style: italic;
    text-align: center;
    max-width: 100%;
    padding: 0 var(--space-sm);
}

/* Responsive Images for Mobile */
@media screen and (max-width: 768px) {
    .image-container {
        margin: var(--space-md) 0;
    }
    
    .inline-image {
        border-radius: var(--border-radius);
        max-height: 300px; /* Smaller max height on mobile */
    }
    
    .image-caption {
        font-size: var(--font-size-xs);
        padding: 0 var(--space-xs);
    }
}

/* Fallback: constrain any image that appears inside post content */
.post-content img {
  max-width: 100%;
  height: auto;
}

/* ====================================
   IMAGE MODAL/LIGHTBOX
   ==================================== */

/* Make images clickable */
.clickable-image {
    cursor: pointer !important;
    transition: var(--transition-base);
}

.clickable-image:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg) !important;
}

/* Modal Background */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
    animation: modalFadeIn 0.3s ease-out;
}

.image-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* Modal Image */
.modal-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-lg);
    animation: imageZoomIn 0.3s ease-out;
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: var(--transition-base);
    user-select: none;
}

.modal-close:hover,
.modal-close:focus {
    color: #cccccc;
    text-decoration: none;
}

/* Modal Caption */
.modal-caption {
    color: #ffffff;
    text-align: center;
    font-size: var(--font-size-small);
    margin-top: var(--space-md);
    background-color: rgba(0, 0, 0, 0.7);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--border-radius);
    max-width: 80%;
}

/* Animations */
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes imageZoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .modal-close {
        top: 10px;
        right: 20px;
        font-size: 32px;
    }
    
    .modal-image {
        max-width: 95%;
        max-height: 85%;
    }
    
    .modal-caption {
        font-size: var(--font-size-xs);
        margin-top: var(--space-sm);
        max-width: 90%;
    }
}

/* Responsive container for YouTube embeds */
.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin-bottom: 1rem;
}
.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ───────────────────────────────────────────────────────────
   Constrain Tweet & Video embeds so they don’t overwhelm text
   ─────────────────────────────────────────────────────────── */

/* 1. Tweet embed wrapper */
.tweet-container {
  max-width: 350px;        /* adjust this width as you like */
  margin: 0 auto 1rem;     /* center horizontally + space below */
}


/* 2. Video embed already responsive; just cap its width */
.video-container {
  max-width: 560px;        /* adjust as needed */
  margin: 0 auto 1rem;     /* center horizontally + space below */
  position: relative;
  padding-bottom: 56.25%;  /* keep the 16:9 ratio hack */
  height: 0;
  overflow: hidden;
}

/* ====================================
   ARCHIVE PAGE STYLES - UPDATED
   ==================================== */

/* Container */
.archive-page {
  width: 100%;
  max-width: 100%;
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
}

/* Header */
.archive-header {
  margin-bottom: var(--space-xl);
  text-align: center;
}
.archive-title {
  font-size: var(--font-size-h2);
  margin-bottom: var(--space-sm);
}
.archive-description {
  color: var(--color-text-light);
  font-size: var(--font-size-medium);
  margin: 0;
}

/* Enhanced Search */
.search-container {
  position: relative;
  margin-bottom: var(--space-lg);
}

.search-input {
  width: 100%;
  padding: var(--space-md) var(--space-md) var(--space-md) 40px;
  border: 2px solid var(--color-border-light);
  border-radius: 25px;
  font-size: var(--font-size-medium);
  transition: var(--transition-base);
}

.search-input:focus {
  outline: none;
  border-color: var(--color-border);
  box-shadow: 0 0 0 3px rgba(224, 224, 224, 0.3);
}

.search-icon {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-light);
}

/* Stats Bar */
.archive-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-light);
  color: var(--color-text);
  border-radius: var(--border-radius-large);
  margin-bottom: var(--space-xl);
  font-size: var(--font-size-small);
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
}

.stat-label {
  opacity: 0.7;
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* Tag Filter Bar */
.tag-filter-bar {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--border-radius-large);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filter-label {
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--color-text);
  font-size: var(--font-size-medium);
}

.tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: white;
  border: 2px solid var(--color-border-light);
  border-radius: 20px;
  cursor: pointer;
  font-size: var(--font-size-small);
  transition: var(--transition-base);
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
}

.tag-pill:hover {
  border-color: var(--color-border);
  background: var(--color-bg-secondary);
  transform: translateY(-1px);
}

.tag-pill.active {
  background: var(--color-bg-secondary);
  border-color: var(--color-border);
  font-weight: 600;
}

.tag-count {
  background: rgba(0,0,0,0.1);
  padding: 0.1em 0.4em;
  border-radius: 10px;
  font-size: 0.8em;
}

/* Timeline */
.archive-timeline {
  position: relative;
}

.archive-timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-border), transparent);
}

/* Year sections */
.archive-year-section {
  margin-bottom: var(--space-xl);
  position: relative;
}

.archive-year-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  padding: var(--space-lg);
  background: var(--color-bg);
  border: 2px solid var(--color-border-light);
  border-radius: var(--border-radius-large);
  cursor: pointer;
  font-size: var(--font-size-large);
  font-weight: 700;
  transition: var(--transition-base);
  color: var(--color-text);
  position: relative;
  z-index: 1;
}

.archive-year-toggle::before {
  content: '';
  position: absolute;
  left: -30px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: var(--color-border);
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--color-border);
}

.archive-year-toggle:hover {
  border-color: var(--color-border);
  background: var(--color-bg-secondary);
  transform: translateX(4px);
}

.archive-year-toggle[aria-expanded="true"] {
  background: var(--color-bg-secondary);
  border-color: var(--color-border);
  font-weight: 700;
}

.archive-year-toggle[aria-expanded="true"]::before {
  background: var(--color-text-light);
}

.year-indicator {
  background: var(--color-bg-secondary);
  color: var(--color-text);
  border: 1px solid var(--color-border-light);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  font-weight: 600;
}

.toggle-icon {
  font-size: 0.8em;
  transition: transform 0.2s ease;
  color: var(--color-text-light);
  margin-left: auto;
}

.archive-year-toggle[aria-expanded="true"] .toggle-icon {
  transform: rotate(90deg);
}

.post-count-badge {
  background: var(--color-bg-secondary);
  color: var(--color-text-light);
  padding: var(--space-xs) var(--space-sm);
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Month sections */
.archive-month-section {
  margin: var(--space-md) 0 var(--space-md) 0;
  border-left: 2px solid var(--color-border-light);
  padding-left: var(--space-lg);
}

.archive-month-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: var(--font-size-small);
  transition: var(--transition-base);
  color: var(--color-text);
  font-weight: 400;
  text-align: left;
  justify-content: flex-start;
}

.archive-month-toggle .toggle-icon {
  order: 1;
  flex-shrink: 0;
}

.archive-month-toggle .month-title {
  order: 2;
  flex: 1;
  text-align: left;
}

.archive-month-toggle .post-count-badge {
  order: 3;
  margin-left: auto;
}

.archive-month-toggle:hover {
  background: var(--color-bg-secondary);
  border-color: var(--color-border);
}

.archive-month-toggle[aria-expanded="true"] {
  background: var(--color-bg-secondary);
  border-color: var(--color-border);
  font-weight: 500;
}

/* Post lists */
.archive-post-list {
  list-style: none;
  margin: var(--space-md) 0 0 0;
  padding: 0;
}

.archive-post-item {
  margin-bottom: var(--space-sm);
  padding: var(--space-sm);
  background: white;
  border: 1px solid var(--color-border-light);
  border-radius: var(--border-radius);
  transition: var(--transition-base);
}

.archive-post-item:hover {
  border-color: var(--color-border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transform: translateX(4px);
}

.archive-post-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--color-link);
  font-size: var(--font-size-small);
}

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

.archive-post-date {
  font-weight: 600;
  color: var(--color-text-light);
  min-width: 50px;
  font-size: 0.85rem;
}

.archive-post-title {
  flex: 1;
  font-weight: 500;
}

.archive-separator {
  margin: 0 var(--space-xs);
  color: var(--color-text-muted);
}

/* Hidden state */
.archive-section-content {
  display: none;
}

.archive-section-toggle[aria-expanded="true"] + .archive-section-content {
  display: block;
}

/* Legacy selectors for backward compatibility */
.archive-tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--border-radius);
}

.archive-tag-filter {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: var(--font-size-small);
  transition: var(--transition-base);
}

.archive-tag-filter:hover {
  background: var(--color-border-light);
  border-color: var(--color-border);
}

.archive-tag-filter.active {
  background: var(--color-bg-secondary);
  border-color: var(--color-border);
  font-weight: 600;
}

/* ====================================
   SEARCH FUNCTIONALITY STYLES - INLINE VERSION
   ==================================== */

/* Search Container */
.search-container {
    position: relative;
    margin-bottom: var(--space-lg);
}

/* Search Results Container - Now inline, not overlay */
.search-results-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 var(--border-radius-large) var(--border-radius-large);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 400px;
    overflow: hidden;
    display: none;
    animation: searchResultsSlideDown 0.2s ease-out;
}

.search-results-container.active {
    display: block;
}

/* Search Input - Enhanced */
.search-input {
    width: 100%;
    padding: var(--space-md) var(--space-md) var(--space-md) 40px;
    border: 2px solid var(--color-border-light);
    border-radius: var(--border-radius-large);
    font-size: var(--font-size-medium);
    transition: var(--transition-base);
    background: var(--color-bg);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.search-input:focus + .search-icon {
    color: var(--color-primary);
}

/* When search is active, modify input styling */
.search-container.has-results .search-input {
    border-radius: var(--border-radius-large) var(--border-radius-large) 0 0;
    border-bottom-color: var(--color-border);
}

/* Search Icon */
.search-icon {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-light);
    transition: var(--transition-base);
    pointer-events: none;
}

/* Search Results Header */
.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
    background: var(--color-bg-secondary);
    font-size: var(--font-size-small);
    color: var(--color-text-light);
}

.search-results-count {
    font-weight: 500;
}

.search-clear {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: var(--space-xs);
    font-size: var(--font-size-small);
    transition: var(--transition-base);
}

.search-clear:hover {
    color: var(--color-text);
}

/* Search Results Content */
.search-results {
    max-height: 320px;
    overflow-y: auto;
    padding: 0;
}

/* Individual Search Result */
.search-result-item {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
    transition: var(--transition-base);
    cursor: pointer;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: var(--color-bg-secondary);
}

/* Search Result Title */
.search-result-title {
    margin: 0 0 var(--space-xs) 0;
    font-size: var(--font-size-small);
    line-height: var(--line-height-tight);
}

.search-result-title a {
    color: var(--color-link);
    text-decoration: none;
}

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

/* Search Result Meta */
.search-result-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-xs);
    color: var(--color-text-light);
    margin: 0;
}

.search-result-type {
    background: var(--color-bg-secondary);
    padding: 0.1em 0.4em;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.75rem;
}

/* Highlighted Search Terms */
.search-result-item mark {
    background-color: #fff3cd;
    color: #856404;
    padding: 0.1em 0.2em;
    border-radius: 2px;
    font-weight: 500;
}

/* No Results */
.search-no-results {
    padding: var(--space-md);
    text-align: center;
    color: var(--color-text-light);
}

.search-suggestion {
    font-size: var(--font-size-xs);
    margin-top: var(--space-xs);
}

/* Loading State */
.search-loading {
    padding: var(--space-md);
    text-align: center;
    color: var(--color-text-light);
    font-size: var(--font-size-small);
}

/* Error State */
.search-error {
    padding: var(--space-md);
    text-align: center;
    color: #dc3545;
    font-size: var(--font-size-small);
}

/* Keyboard Navigation Hint */
.search-keyboard-hint {
    padding: var(--space-xs) var(--space-md);
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border-light);
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    text-align: center;
}

/* Animations */
@keyframes searchResultsSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .search-results-container {
        max-height: 300px;
    }
    
    .search-results {
        max-height: 240px;
    }
    
    .search-result-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }
}

/* For sidebar search boxes - make them relative containers */
.sidebar .search-form {
    position: relative;
}

.sidebar .search-results-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1001;
}

/* ====================================
   LINKED IMAGE STYLES
   Add these styles to your style.css
   ==================================== */

/* Image link wrapper */
.image-container .image-link {
    display: block;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition-base);
    position: relative;
}

.image-container .image-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Linked images get different styling than clickable modal images */
.linked-image {
    border: 2px solid transparent;
    transition: var(--transition-base);
    cursor: pointer;
}

.linked-image:hover {
    border-color: var(--color-link);
    transform: scale(1.02);
}

/* Add a small link icon overlay to indicate it's a link */
.image-container .image-link::after {
    content: "🔗";
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--border-radius);
    font-size: var(--font-size-xs);
    opacity: 0;
    transition: var(--transition-base);
    z-index: 10;
}

.image-container .image-link:hover::after {
    opacity: 1;
}

/* Make sure the image container is positioned relatively for the overlay */
.image-container {
    position: relative;
    margin: var(--space-lg) 0;
    text-align: center;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Distinguish between linked and modal images visually */
.clickable-image {
    /* Keep existing modal image styles */
}

.linked-image {
    /* No onclick modal behavior, just link styling */
}