/* ============================================
   Modern Hugo Theme with Dark/Light Mode
   Clean Typography & Hierarchical Navigation
   ============================================ */

/* CSS Variables for Light Mode */
:root {
    /* Brand Colors */
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #60a5fa;
    --accent: #3b82f6;
    
    /* Light Mode Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-elevated: #ffffff;
    
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    
    --border-color: #e5e7eb;
    --border-hover: #d1d5db;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Monaco', 'Courier New', monospace;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --bg-elevated: #1f2937;
    
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-tertiary: #9ca3af;
    
    --border-color: #374151;
    --border-hover: #4b5563;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
}

/* ============================================
   Reset & Base Styles
   ============================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ============================================
   Layout Container
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================
   Header & Navigation
   ============================================ */

.site-header {
    background-color: var(--bg-elevated);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    transition: all var(--transition-base);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 2rem;
}

/* Site Branding */
.site-branding .site-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.site-branding .site-title:hover {
    opacity: 0.8;
}

.site-logo {
    height: 40px;
    width: auto;
}

.site-title-text {
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

.nav-list {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

.nav-list > li {
    position: relative;
}

.nav-list > li > a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: 0.5rem;
    transition: all var(--transition-fast);
}

.nav-list > li > a:hover,
.nav-list > li > a.active {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

.nav-list > li > a.active {
    color: var(--primary);
}

/* Dropdown Menu */
.nav-item-with-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    margin-top: 0.5rem;
    overflow: hidden;
}

.nav-item-with-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.dropdown-menu li a:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background-color: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

[data-theme="light"] .moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

/* Search Toggle */
.search-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0.5rem !important;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

/* ============================================
   Main Content
   ============================================ */

.main-content {
    min-height: calc(100vh - 400px);
    padding: 3rem 0;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    text-align: center;
    padding: 4rem 2rem;
    margin-bottom: 3rem;
    margin-left: auto;
    margin-right: auto;
    max-width: fit-content;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
}

.hero-logo {
    height: 150px;
    width: auto;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ============================================
   Post Cards
   ============================================ */

.recent-posts,
.post-list {
    max-width: 800px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.post-item {
    background-color: var(--bg-elevated);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    transition: all var(--transition-base);
}

.post-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.post-item img {
    max-width: 50%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 0.5rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: 0.75rem;
}

.post-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

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

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

.post-summary {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: gap var(--transition-fast);
}

.read-more:hover {
    gap: 0.75rem;
}

.view-all {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    margin-top: 1rem;
}

.view-all:hover {
    color: var(--primary-dark);
}

.view-all-container {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Featured Post Section */
.featured-post {
    margin-bottom: 4rem;
    max-width: 100%;
}

.featured-post-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.featured-post-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: transparent;
    border-radius: 1rem;
}

.hero-tech-image {
    width: 100%;
    height: auto;
    max-width: 500px;
    object-fit: contain;
    border-radius: 0.5rem;
}

.featured-post-content {
    background: var(--bg-elevated);
    padding: 3rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.featured-post-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

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

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

.featured-post-summary {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.featured-post-summary p {
    margin-bottom: 1rem;
}

.read-more-featured {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary);
    border-radius: 0.5rem;
    transition: all var(--transition-fast);
}

.read-more-featured:hover {
    background: var(--primary);
    color: white;
}

/* Other Posts Grid */
.other-posts {
    margin-bottom: 4rem;
}

.post-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.post-link-item {
    background: var(--bg-elevated);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.post-link-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.post-link-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.post-link-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

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

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

.post-link-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag-small {
    display: inline-block;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ============================================
   Single Post
   ============================================ */

.post {
    background-color: var(--bg-elevated);
    padding: 3rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    max-width: 800px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.post-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.post-author {
    margin-left: 1rem;
}

.reading-time {
    margin-left: 1rem;
}

/* Table of Contents */
.table-of-contents {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary);
}

.table-of-contents h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.table-of-contents ul {
    list-style: none;
}

.table-of-contents a {
    color: var(--primary);
    text-decoration: none;
}

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

.post-content h2 {
    font-size: 2rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.post-content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.post-content h4 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

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

.post-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.post-content code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background-color: var(--bg-tertiary);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    color: var(--text-primary);
}

.post-content pre {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.post-content pre code {
    background: none;
    padding: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Syntax Highlighting Overrides */
.post-content .chroma {
    background-color: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
}

.post-content .chroma .err,
.post-content .chroma .k,
.post-content .chroma .kc,
.post-content .chroma .kd,
.post-content .chroma .kn,
.post-content .chroma .kp,
.post-content .chroma .kr,
.post-content .chroma .kt,
.post-content .chroma .n,
.post-content .chroma .na,
.post-content .chroma .nb,
.post-content .chroma .bp,
.post-content .chroma .nc,
.post-content .chroma .no,
.post-content .chroma .nd,
.post-content .chroma .ni,
.post-content .chroma .ne,
.post-content .chroma .nf,
.post-content .chroma .fm,
.post-content .chroma .nl,
.post-content .chroma .nn,
.post-content .chroma .nx,
.post-content .chroma .py,
.post-content .chroma .nt,
.post-content .chroma .nv,
.post-content .chroma .vc,
.post-content .chroma .vg,
.post-content .chroma .vi,
.post-content .chroma .vm,
.post-content .chroma .l,
.post-content .chroma .ld,
.post-content .chroma .s,
.post-content .chroma .sa,
.post-content .chroma .sb,
.post-content .chroma .sc,
.post-content .chroma .dl,
.post-content .chroma .sd,
.post-content .chroma .s2,
.post-content .chroma .se,
.post-content .chroma .sh,
.post-content .chroma .si,
.post-content .chroma .sx,
.post-content .chroma .sr,
.post-content .chroma .s1,
.post-content .chroma .ss,
.post-content .chroma .m,
.post-content .chroma .mb,
.post-content .chroma .mf,
.post-content .chroma .mh,
.post-content .chroma .mi,
.post-content .chroma .il,
.post-content .chroma .mo,
.post-content .chroma .o,
.post-content .chroma .ow,
.post-content .chroma .p,
.post-content .chroma .c,
.post-content .chroma .ch,
.post-content .chroma .cm,
.post-content .chroma .c1,
.post-content .chroma .cs,
.post-content .chroma .cp,
.post-content .chroma .cpf,
.post-content .chroma .g,
.post-content .chroma .gd,
.post-content .chroma .ge,
.post-content .chroma .gr,
.post-content .chroma .gh,
.post-content .chroma .gi,
.post-content .chroma .go,
.post-content .chroma .gp,
.post-content .chroma .gs,
.post-content .chroma .gu,
.post-content .chroma .gt,
.post-content .chroma .gl,
.post-content .chroma .w {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .post-content .chroma {
    background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] .post-content .chroma .k,
[data-theme="dark"] .post-content .chroma .kd,
[data-theme="dark"] .post-content .chroma .kn {
    color: #60a5fa !important;
}

[data-theme="dark"] .post-content .chroma .s,
[data-theme="dark"] .post-content .chroma .s2,
[data-theme="dark"] .post-content .chroma .s1 {
    color: #a5f3fc !important;
}

[data-theme="dark"] .post-content .chroma .c,
[data-theme="dark"] .post-content .chroma .c1,
[data-theme="dark"] .post-content .chroma .cm {
    color: #9ca3af !important;
    font-style: italic;
}

[data-theme="dark"] .post-content .chroma .nf,
[data-theme="dark"] .post-content .chroma .fm {
    color: #fbbf24 !important;
}

[data-theme="dark"] .post-content .chroma .na {
    color: #a78bfa !important;
}

.post-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

.post-content img {
    max-width: 50%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5rem auto;
    display: block;
    border: 1px solid var(--border-color);
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Featured Image */
.featured-image {
    margin: 1.5rem 0;
}

.featured-image img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    display: block;
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* ============================================
   Tags
   ============================================ */

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.tag {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-color);
}

.tag:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ============================================
   Search Overlay
   ============================================ */

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 5rem;
    z-index: 1000;
    animation: fadeIn var(--transition-base);
}

.search-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.search-container {
    background-color: var(--bg-elevated);
    padding: 2rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
}

.search-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
    font-family: var(--font-sans);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    outline: none;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color var(--transition-fast);
}

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

.search-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
    line-height: 1;
}

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

.search-results {
    margin-top: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.search-result-item {
    display: block;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-fast);
}

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

.search-result-item h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.search-result-item p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
}

.search-result-item mark {
    background: #fef08a;
    padding: 0.1rem 0.2rem;
    border-radius: 0.2rem;
}

.search-result-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ============================================
   Pagination
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.pagination a:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--border-hover);
}

.pagination .active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 700;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

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

.social-links {
    display: flex;
    gap: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* ============================================
   Lightbox
   ============================================ */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.75rem;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: opacity var(--transition-fast);
    line-height: 1;
}

.lightbox-close:hover {
    opacity: 0.8;
}

/* ============================================
   Page Header
   ============================================ */

.page-header {
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.page-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .post,
    .post-item {
        padding: 1.5rem;
    }
    
    .post-header h1 {
        font-size: 1.75rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    /* Featured post - stack on mobile */
    .featured-post-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .featured-post-image {
        order: -1;
        padding: 1.5rem;
    }
    
    .featured-post-content {
        padding: 2rem;
    }

    .featured-post-title {
        font-size: 1.75rem;
    }

    .featured-post-summary {
        font-size: 1rem;
    }

    .post-links-grid {
        grid-template-columns: 1fr;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    /* Mobile Menu */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-list {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--bg-elevated);
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
        gap: 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-list.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-list > li {
        width: 100%;
    }
    
    .nav-list > li > a {
        width: 100%;
        padding: 1rem;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: none;
        box-shadow: none;
        margin-top: 0.5rem;
        margin-left: 1rem;
        background-color: var(--bg-tertiary);
        border-radius: 0.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .nav-list {
        gap: 0.25rem;
    }
    
    .nav-list > li > a {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* ============================================
   Utility Classes
   ============================================ */

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none;
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .site-header,
    .site-footer,
    .search-overlay,
    .theme-toggle,
    .mobile-menu-toggle {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .post,
    .post-item {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ============================================
   Contact Page
   ============================================ */

.contact-page {
    background-color: var(--bg-elevated);
    padding: 3rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    max-width: 1200px;
    margin: 0 auto;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 2rem;
}

.contact-form-section h2,
.contact-info-section h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

/* Contact Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.form-group .required {
    color: #ef4444;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group.has-error input,
.form-group.has-error textarea {
    border-color: #ef4444;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    display: block;
    min-height: 1.25rem;
}

.btn-submit {
    padding: 0.875rem 2rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    align-self: flex-start;
}

.btn-submit:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-submit:active {
    transform: translateY(0);
}

.form-status {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    display: none;
    font-weight: 500;
}

.form-status.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #34d399;
}

.form-status.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

[data-theme="dark"] .form-status.success {
    background-color: #064e3b;
    color: #6ee7b7;
    border-color: #059669;
}

[data-theme="dark"] .form-status.error {
    background-color: #7f1d1d;
    color: #fca5a5;
    border-color: #dc2626;
}

/* Contact Info Section */
.contact-info-section {
    display: flex;
    flex-direction: column;
}

.contact-content {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.contact-content h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.contact-content h2:first-child {
    margin-top: 0;
}

.contact-content p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.contact-content strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
}

.contact-content a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.contact-content a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Responsive Contact Page */
@media (max-width: 768px) {
    .contact-page {
        padding: 1.5rem;
    }
    
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .btn-submit {
        width: 100%;
    }
}
