/*
Theme Name: Fitz Development Blog
Theme URI: https://github.com/RQMEO
Author: Billy P (Fitz)
Author URI: https://github.com/RQMEO
Description: A dark monochrome theme for developers. Solo developer building intelligent systems to reshape how the world uses AI.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fitz-dev-blog
Tags: blog, dark, monochrome, developer, clean, modern
*/

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --bg-hover: #333333;
    --text-primary: #e8e8e8;
    --text-secondary: #a0a0a0;
    --text-muted: #6a6a6a;
    --accent: #00ff88;
    --accent-dim: #00cc6a;
    --border: #2a2a2a;
    --glow: rgba(0, 255, 136, 0.15);
}

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

body {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 136, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 136, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--border);
    padding: 2rem 0;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-family: 'Syne', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
}

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

.site-title::before {
    content: '>';
    color: var(--accent);
    margin-right: 0.5rem;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0.3; }
}

.tagline {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-weight: 300;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: all 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

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

nav a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    padding: 6rem 0 4rem;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-family: 'Syne', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 2rem;
    font-weight: 300;
}

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 4rem;
    padding: 3rem 0;
    animation: fadeIn 0.8s ease-out 0.4s both;
}

/* Posts Section */
.posts-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.posts-header h2 {
    font-family: 'Syne', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.post-count {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Post Card */
.post-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.6s ease-out both;
}

.post-card:nth-child(1) { animation-delay: 0.1s; }
.post-card:nth-child(2) { animation-delay: 0.2s; }
.post-card:nth-child(3) { animation-delay: 0.3s; }
.post-card:nth-child(4) { animation-delay: 0.4s; }
.post-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--accent);
    transition: height 0.4s ease;
}

.post-card:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent);
    transform: translateX(4px);
    box-shadow: 0 0 30px var(--glow);
}

.post-card:hover::before {
    height: 100%;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.post-meta span::before {
    content: '•';
    color: var(--accent);
}

.post-title {
    font-family: 'Syne', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.post-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-weight: 300;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.read-more::after {
    content: '→';
    transition: transform 0.3s ease;
}

.read-more:hover::after {
    transform: translateX(4px);
}

/* Sidebar */
.sidebar {
    animation: fadeIn 0.8s ease-out 0.6s both;
}

.widget {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.widget:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--glow);
}

.widget-title {
    font-family: 'Syne', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-title::before {
    content: '▸';
    color: var(--accent);
}

/* Search Widget */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.75rem;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--glow);
}

.search-button {
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    border-radius: 4px;
    padding: 0.75rem 1.5rem;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    background: var(--accent-dim);
    transform: scale(1.05);
}

/* Recent Posts Widget */
.recent-posts-list {
    list-style: none;
}

.recent-posts-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

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

.recent-posts-list li:hover {
    padding-left: 0.5rem;
    border-left: 2px solid var(--accent);
}

.recent-posts-list a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    display: block;
}

.recent-posts-list a:hover {
    color: var(--accent);
}

.recent-post-date {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Archives Widget */
.archives-list {
    list-style: none;
}

.archives-list li {
    padding: 0.5rem 0;
}

.archives-list a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.archives-list a:hover {
    color: var(--accent);
    padding-left: 0.5rem;
}

.post-count-badge {
    background: var(--bg-tertiary);
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* No Comments */
.no-comments {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 0;
    font-size: 0.9rem;
}

/* Post Content Styling */
.post-content {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    font-family: 'Syne', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    position: relative;
    animation: slideInLeft 0.6s ease-out both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.post-content h1 {
    font-size: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent);
    margin-bottom: 1.5rem;
}

.post-content h2 {
    font-size: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.post-content h3 {
    font-size: 1.5rem;
    color: var(--accent);
}

.post-content h4 {
    font-size: 1.25rem;
}

.post-content h5,
.post-content h6 {
    font-size: 1.1rem;
}

.post-content p {
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.1s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-content p:nth-of-type(1) { animation-delay: 0.1s; }
.post-content p:nth-of-type(2) { animation-delay: 0.15s; }
.post-content p:nth-of-type(3) { animation-delay: 0.2s; }
.post-content p:nth-of-type(4) { animation-delay: 0.25s; }
.post-content p:nth-of-type(5) { animation-delay: 0.3s; }

.post-content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.post-content a:hover {
    border-bottom-color: var(--accent);
    padding-left: 4px;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.75rem;
    position: relative;
}

.post-content li::marker {
    color: var(--accent);
}

.post-content ul li::before {
    content: '▸';
    color: var(--accent);
    position: absolute;
    left: -1.5rem;
}

.post-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: var(--bg-secondary);
    border-left: 4px solid var(--accent);
    border-radius: 4px;
    font-style: italic;
    color: var(--text-secondary);
    animation: slideInLeft 0.6s ease-out both;
}

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

.post-content code {
    background: var(--bg-secondary);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--accent);
    border: 1px solid var(--border);
}

.post-content pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    overflow-x: auto;
    position: relative;
    animation: slideUp 0.6s ease-out both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-content pre code {
    background: none;
    padding: 0;
    border: none;
    color: var(--text-primary);
}

.post-content pre::before {
    content: '# code';
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    border: 1px solid var(--border);
    transition: all 0.4s ease;
    animation: zoomIn 0.6s ease-out both;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.post-content img:hover {
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--glow);
    transform: scale(1.02);
}

.post-content hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 3rem 0;
    position: relative;
}

.post-content hr::after {
    content: '◆';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-primary);
    color: var(--accent);
    padding: 0 1rem;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    animation: fadeIn 0.6s ease-out both;
}

.post-content table th,
.post-content table td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    text-align: left;
}

.post-content table th {
    background: var(--bg-secondary);
    color: var(--accent);
    font-weight: 600;
}

.post-content table tr:hover {
    background: var(--bg-secondary);
}

/* Staggered paragraph animations on scroll */
.post-content.animate-on-scroll p {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.post-content.animate-on-scroll p.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Post Tags */
.post-tags {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.tags-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-right: 0.5rem;
}

.tag-item {
    display: inline-block;
    background: var(--bg-secondary);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    margin: 0.25rem;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin: 2rem 0;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.post-navigation > div {
    flex: 1;
}

.post-navigation a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.post-navigation a:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateX(-4px);
    box-shadow: 0 0 20px var(--glow);
}

.post-navigation .nav-next a:hover {
    transform: translateX(4px);
}

.post-navigation .nav-next {
    text-align: right;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    margin-top: 4rem;
    text-align: center;
}

.footer-content {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-content a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-content a:hover {
    color: var(--accent-dim);
}

/* Responsive Design */

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero h1 {
        font-size: 4.5rem;
    }
}

/* Desktop (1024px - 1399px) */
@media (max-width: 1399px) {
    .container {
        max-width: 1200px;
    }
}

/* Tablet Landscape & Small Desktop (1024px - 1200px) */
@media (max-width: 1200px) {
    .main-layout {
        grid-template-columns: 1fr 320px;
        gap: 3rem;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .post-title {
        font-size: 1.6rem;
    }
}

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero {
        padding: 4rem 0 3rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    /* Two-column sidebar widgets on tablet */
    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .post-card {
        padding: 1.75rem;
    }
    
    .post-title {
        font-size: 1.6rem;
    }
    
    /* Make navigation more touch-friendly */
    nav ul {
        gap: 1.5rem;
    }
    
    nav a {
        font-size: 1rem;
        padding: 0.5rem 0;
    }
}

/* Mobile Landscape & Small Tablet (600px - 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    /* Header adjustments */
    .site-header {
        padding: 1.5rem 0;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .tagline {
        font-size: 0.85rem;
    }
    
    /* Navigation - horizontal but compact */
    nav ul {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    nav a {
        font-size: 0.9rem;
    }
    
    /* Hero section */
    .hero {
        padding: 3rem 0 2rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    /* Posts */
    .posts-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .post-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
    
    .post-meta {
        flex-wrap: wrap;
        gap: 1rem;
        font-size: 0.75rem;
    }
    
    .post-excerpt {
        font-size: 0.95rem;
    }
    
    /* Sidebar - single column on mobile landscape */
    .sidebar {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .widget {
        padding: 1.25rem;
    }
    
    .widget-title {
        font-size: 1rem;
    }
    
    /* Post content */
    .post-content h1 {
        font-size: 2rem;
    }
    
    .post-content h2 {
        font-size: 1.75rem;
    }
    
    .post-content h3 {
        font-size: 1.35rem;
    }
    
    .post-content {
        font-size: 0.95rem;
    }
    
    /* Footer */
    .site-footer {
        padding: 2rem 0;
    }
    
    .footer-content {
        font-size: 0.8rem;
    }
}

/* Mobile Portrait (< 600px) */
@media (max-width: 600px) {
    .container {
        padding: 0 1rem;
    }
    
    /* Header - more compact */
    .site-header {
        padding: 1rem 0;
    }
    
    .site-title {
        font-size: 1.25rem;
    }
    
    .site-title::before {
        margin-right: 0.25rem;
    }
    
    .tagline {
        font-size: 0.8rem;
        margin-top: 0.15rem;
    }
    
    /* Navigation - stack vertically on tiny screens if needed */
    nav ul {
        gap: 0.75rem;
    }
    
    nav a {
        font-size: 0.85rem;
        padding: 0.4rem 0;
    }
    
    /* Hero - much smaller */
    .hero {
        padding: 2rem 0 1.5rem;
    }
    
    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero h1 span {
        display: block;
        margin-top: 0.25rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Main layout */
    .main-layout {
        padding: 2rem 0;
        gap: 2rem;
    }
    
    /* Posts header */
    .posts-header h2 {
        font-size: 1.25rem;
    }
    
    .post-count {
        font-size: 0.8rem;
    }
    
    /* Post cards - more compact */
    .post-card {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
        border-radius: 6px;
    }
    
    .post-card:hover {
        transform: translateX(2px); /* Less movement on mobile */
    }
    
    .post-title {
        font-size: 1.35rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }
    
    .post-meta {
        gap: 0.75rem;
        font-size: 0.7rem;
        margin-bottom: 0.75rem;
    }
    
    .post-excerpt {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }
    
    .read-more {
        font-size: 0.85rem;
    }
    
    /* Widgets - full width, more compact */
    .widget {
        padding: 1rem;
        margin-bottom: 1.25rem;
        border-radius: 6px;
    }
    
    .widget-title {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }
    
    /* Search form - touch friendly */
    .search-input {
        padding: 0.65rem;
        font-size: 0.85rem;
    }
    
    .search-button {
        padding: 0.65rem 1.25rem;
        font-size: 0.85rem;
    }
    
    /* Recent posts list */
    .recent-posts-list a {
        font-size: 0.85rem;
    }
    
    .recent-post-date {
        font-size: 0.7rem;
    }
    
    /* Archives */
    .archives-list a {
        font-size: 0.85rem;
    }
    
    .post-count-badge {
        font-size: 0.7rem;
        padding: 0.1rem 0.4rem;
    }
    
    /* Post content typography */
    .post-content {
        font-size: 0.9rem;
        line-height: 1.7;
    }
    
    .post-content h1 {
        font-size: 1.75rem;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }
    
    .post-content h2 {
        font-size: 1.5rem;
        margin-top: 1.75rem;
        margin-bottom: 0.85rem;
    }
    
    .post-content h3 {
        font-size: 1.25rem;
        margin-top: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .post-content h4,
    .post-content h5,
    .post-content h6 {
        font-size: 1.1rem;
        margin-top: 1.25rem;
        margin-bottom: 0.65rem;
    }
    
    .post-content p {
        margin-bottom: 1.25rem;
    }
    
    .post-content ul,
    .post-content ol {
        padding-left: 1.5rem;
        margin-bottom: 1.25rem;
    }
    
    .post-content li {
        margin-bottom: 0.5rem;
    }
    
    .post-content blockquote {
        padding: 1rem 1.25rem;
        margin: 1.5rem 0;
        font-size: 0.9rem;
    }
    
    .post-content pre {
        padding: 1rem;
        margin: 1.5rem 0;
        font-size: 0.8rem;
        overflow-x: auto;
    }
    
    .post-content code {
        font-size: 0.85em;
        padding: 0.15rem 0.4rem;
    }
    
    .post-content img {
        margin: 1.5rem 0;
        border-radius: 6px;
    }
    
    .post-content table {
        font-size: 0.85rem;
        margin: 1.5rem 0;
    }
    
    .post-content table th,
    .post-content table td {
        padding: 0.5rem 0.75rem;
    }
    
    /* Post tags */
    .post-tags {
        margin-top: 1.5rem;
        padding-top: 0.75rem;
    }
    
    .tags-label {
        font-size: 0.8rem;
    }
    
    .tag-item {
        padding: 0.2rem 0.6rem;
        font-size: 0.8rem;
        margin: 0.2rem;
    }
    
    /* Post navigation */
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
        margin: 1.5rem 0;
        padding: 1.5rem 0;
    }
    
    .post-navigation a {
        padding: 0.85rem;
        font-size: 0.85rem;
    }
    
    .post-navigation .nav-next {
        text-align: left;
    }
    
    /* Footer */
    .site-footer {
        padding: 1.5rem 0;
        margin-top: 2rem;
    }
    
    .footer-content {
        font-size: 0.75rem;
    }
    
    .footer-content p {
        margin-bottom: 0.5rem;
    }
}

/* Extra Small Mobile (< 400px) */
@media (max-width: 400px) {
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .post-title {
        font-size: 1.2rem;
    }
    
    .post-card {
        padding: 1rem;
    }
    
    .widget {
        padding: 0.85rem;
    }
    
    /* Make search form stack on very small screens */
    .search-form {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-button {
        width: 100%;
        padding: 0.75rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    nav a {
        padding: 0.75rem 0.5rem;
    }
    
    .search-button,
    .read-more {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Reduce hover effects on touch devices */
    .post-card:hover {
        transform: none;
    }
    
    /* Make links more obvious on touch */
    .post-content a {
        border-bottom: 1px solid var(--accent);
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Slightly increase base font size for retina displays */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 2rem 0 1.5rem;
    }
    
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .main-layout {
        padding: 2rem 0;
    }
}

/* Print styles */
@media print {
    .site-header,
    .sidebar,
    .post-navigation,
    .site-footer,
    nav {
        display: none;
    }
    
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .post-content {
        color: #000;
    }
    
    .post-content a {
        color: #000;
        text-decoration: underline;
    }
}
