:root {
    --primary-color: #1a1a1a;
    --secondary-color: #4a5568;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --background: #ffffff;
    --surface: #f7fafc;
    --border: #e2e8f0;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --code-bg: #f7fafc;
    --shadow: 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);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-color: #e2e8f0;
    --secondary-color: #cbd5e0;
    --accent-color: #60a5fa;
    --accent-hover: #3b82f6;
    --background: #0f172a;
    --surface: #1e293b;
    --border: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e0;
    --text-muted: #94a3b8;
    --code-bg: #1e293b;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

html {
    scroll-behavior: smooth;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--background);
    font-size: 18px;
}

/* Header - Magazine Masthead */
.site-header {
    padding: 1.5rem 2rem;
    border-bottom: 4px double #1a1a1a;
    border-top: 1px solid #1a1a1a;
    background: var(--background);
    color: var(--primary-color);
    position: relative;
}

[data-theme="dark"] .site-header {
    border-bottom-color: var(--border);
    border-top-color: var(--border);
}

.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        #1a1a1a 0%,
        #1a1a1a 20%,
        transparent 20%,
        transparent 40%,
        #1a1a1a 40%,
        #1a1a1a 60%,
        transparent 60%,
        transparent 80%,
        #1a1a1a 80%,
        #1a1a1a 100%
    );
}

[data-theme="dark"] .site-header::before {
    background: linear-gradient(90deg,
        var(--accent-color) 0%,
        var(--accent-color) 20%,
        transparent 20%,
        transparent 40%,
        var(--accent-color) 40%,
        var(--accent-color) 60%,
        transparent 60%,
        transparent 80%,
        var(--accent-color) 80%,
        var(--accent-color) 100%
    );
}

.site-title {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    font-family: 'Playfair Display', Georgia, serif;
    text-align: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    position: relative;
}

.site-title::after {
    content: '◆';
    position: absolute;
    bottom: -0.6rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--background);
    padding: 0 1rem;
    font-size: 0.8rem;
}

.site-description {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-align: center;
    margin-top: 0.75rem;
    font-family: 'Inter', sans-serif;
}

/* Container */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Period Header */
.period-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0 1rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1rem;
}

[data-theme="dark"] .period-header {
    border-bottom-color: var(--border);
}

.period-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.period-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Libre Baskerville', Georgia, serif;
}

.article-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.period-nav {
    display: flex;
    gap: 1.5rem;
}

.period-link {
    padding: 0.75rem 1.25rem;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border: 2px solid var(--border);
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.period-link:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.period-link.period-prev,
.period-link.period-next {
    flex-direction: column;
    padding: 0.75rem 1rem;
}

.period-link.period-prev {
    align-items: flex-start;
}

.period-link.period-next {
    align-items: flex-end;
}

.period-nav.period-nav-bottom {
    justify-content: center;
    margin: 3rem 0;
}

.period-nav.period-nav-bottom .period-link {
    text-align: center;
}

.period-nav.period-nav-bottom .period-link.period-prev,
.period-nav.period-nav-bottom .period-link.period-next {
    align-items: center;
}

.nav-action {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.nav-period {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
}

.period-link:hover .nav-period {
    color: var(--accent-color);
}

[data-theme="dark"] .period-link {
    background: var(--surface);
    color: var(--text-primary);
    border-color: var(--border);
}

[data-theme="dark"] .period-link:hover {
    background: var(--background);
    border-color: var(--accent-color);
}

/* Magazine Layout - Main container */
.magazine-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    padding: 2rem 0;
}

/* Plasma Sidebar - Standalone design element */
.plasma-sidebar {
    position: sticky;
    top: 2rem;
    height: 600px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-right: 2px solid #1a1a1a;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .plasma-sidebar {
    border-right-color: var(--accent-color);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
}

.plasma-sidebar canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Magazine Grid - Multi-column newspaper layout */
.magazine-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem 1rem;
    grid-auto-flow: dense;
}

/* Post base styling - no cards */
.post {
    padding: 1.25rem;
    background: transparent;
    border: 1px solid transparent;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.25rem;
    cursor: pointer;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s ease;
}

/* Make entire post card clickable */
.post .post-title a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* Ensure other links are still clickable */
.post .read-more,
.post .post-thumbnail {
    position: relative;
    z-index: 2;
}

.post::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(59, 130, 246, 0.03) 50%,
        transparent 100%);
    transition: left 0.6s ease;
    z-index: -1;
}

.post:hover::before {
    left: 100%;
}

.post:hover {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(247, 250, 252, 0.8) 100%);
    border-color: rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .post:hover {
    background: linear-gradient(135deg,
        rgba(30, 41, 59, 0.5) 0%,
        rgba(51, 65, 85, 0.8) 100%);
    border-color: rgba(96, 165, 250, 0.3);
}

/* Featured Badge */
.featured-badge {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.35rem 0.75rem;
    border-radius: 3px;
    margin-bottom: 1rem;
}

/* Post Thumbnail */
.post-thumbnail {
    display: block;
    width: 100%;
    margin-bottom: 1.25rem;
    overflow: hidden;
    border-radius: 4px;
    position: relative;
}

.post-thumbnail img,
.post-thumbnail video {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease, opacity 0.4s ease;
    object-fit: cover;
}

.post:hover .post-thumbnail img,
.post:hover .post-thumbnail video {
    transform: scale(1.03);
    opacity: 0.92;
}

/* Thumbnail sizing for different layouts */
.lead-story .post-thumbnail {
    max-height: 400px;
}

.lead-story .post-thumbnail img,
.lead-story .post-thumbnail video {
    object-fit: cover;
    height: 400px;
}

.feature-2 .post-thumbnail,
.feature-3 .post-thumbnail {
    max-height: 250px;
}

.feature-2 .post-thumbnail img,
.feature-2 .post-thumbnail video,
.feature-3 .post-thumbnail img,
.feature-3 .post-thumbnail video {
    object-fit: cover;
    height: 250px;
}

.column-2 .post-thumbnail,
.column-1 .post-thumbnail {
    max-height: 200px;
}

.column-2 .post-thumbnail img,
.column-2 .post-thumbnail video,
.column-1 .post-thumbnail img,
.column-1 .post-thumbnail video {
    object-fit: cover;
    height: 200px;
}

/* Lead Story - Large, prominent, spans 4 columns */
.post.lead-story {
    grid-column: span 4;
    border-bottom: 3px double #1a1a1a;
    padding-bottom: 1.5rem;
}

[data-theme="dark"] .post.lead-story {
    border-bottom-color: var(--border);
}

.post.lead-story:hover {
    border-bottom-color: var(--accent-color);
}

.post.lead-story:hover .featured-badge {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.featured-badge {
    transition: all 0.3s ease;
}

.post.lead-story .post-title {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', Georgia, serif;
    letter-spacing: -0.01em;
}

.post.lead-story .post-summary {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    column-count: 2;
    column-gap: 2rem;
}

/* Feature 2 - Medium prominence, spans 2 columns */
.post.feature-2 {
    grid-column: span 2;
    border-left: 3px solid var(--accent-color);
}

.post.feature-2 .post-title {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    font-family: 'Libre Baskerville', Georgia, serif;
}

/* Feature 3 - Vertical sidebar style, spans 2 columns, tall */
.post.feature-3 {
    grid-column: span 2;
    grid-row: span 2;
    background: var(--surface);
    border: 1px solid var(--border);
}

.post.feature-3 .post-title {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    font-family: 'Libre Baskerville', Georgia, serif;
}

/* Column 2 - Medium articles, span 2 columns */
.post.column-2 {
    grid-column: span 2;
}

.post.column-2 .post-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    font-family: 'Libre Baskerville', Georgia, serif;
}

/* Column 1 - Single column articles */
.post.column-1 {
    grid-column: span 1;
}

.post.column-1 .post-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    font-family: 'Libre Baskerville', Georgia, serif;
}

.post.column-1 .post-summary {
    font-size: 0.8rem;
    line-height: 1.4;
}

/* List Item - Compact single-line list for posts without summaries */
.post.list-item {
    grid-column: span 2;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
    border-left: 3px solid transparent;
    transition: border-left-color 0.3s ease, background 0.3s ease;
}

.post.list-item:hover {
    border-left-color: var(--accent-color);
}

.list-link {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    align-items: baseline;
    text-decoration: none;
    color: inherit;
}

.list-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.post.list-item .post-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0;
    font-family: 'Libre Baskerville', Georgia, serif;
}

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

.post-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.post-author {
    font-weight: 600;
    color: var(--accent-color);
}

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

.post-title {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    transition: color 0.2s ease;
    font-family: 'Libre Baskerville', Georgia, serif;
}

.post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.post-summary {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s ease, gap 0.2s ease;
}

.read-more:hover {
    gap: 0.5rem;
    color: var(--accent-hover);
}

/* Single Post Page */
.post-header {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.post-header .post-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-family: 'Playfair Display', Georgia, serif;
}

.post-header .post-meta {
    font-size: 1rem;
    justify-content: flex-start;
}

.post-body {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    font-size: 16px;
}

.post-body h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 3rem 0 1.5rem;
    color: var(--primary-color);
}

.post-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
    color: var(--primary-color);
}

.post-body h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--text-secondary);
}

.post-body p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

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

.post-body li {
    margin-bottom: 0.75rem;
}

.post-body a {
    color: var(--accent-color);
    text-decoration: underline;
    text-decoration-color: rgba(59, 130, 246, 0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.2s ease;
    font-weight: 600;
}

.post-body a:hover {
    text-decoration-color: var(--accent-color);
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2.5rem 0;
    box-shadow: var(--shadow);
}

/* Embedded Videos */
.post-body iframe,
.post-body video {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 3rem auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    background: var(--surface);
}

[data-theme="dark"] .post-body iframe,
[data-theme="dark"] .post-body video {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Responsive video container for proper aspect ratio */
.post-body p > iframe[src*="youtube"],
.post-body p > iframe[src*="vimeo"],
.post-body p > iframe[src*="youtu.be"] {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 400px;
}

/* Video wrapper styling for manually wrapped videos */
.video-wrapper {
    position: relative;
    width: 100%;
    margin: 3rem auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
}

.video-wrapper iframe,
.video-wrapper video {
    margin: 0;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

[data-theme="dark"] .video-wrapper {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

.post-body blockquote {
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background: var(--surface);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.callout {
    --callout-accent: var(--accent-color);
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 6px solid var(--callout-accent);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2.5rem 0;
    box-shadow: var(--shadow);
}

.callout-title {
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    font-weight: 700;
    color: var(--callout-accent);
    margin-bottom: 0.75rem;
}

.callout-body > :first-child {
    margin-top: 0;
}

.callout-body > :last-child {
    margin-bottom: 0;
}

/* Callout type colors - with background tints */
.callout-info {
    --callout-accent: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.callout-note {
    --callout-accent: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

.callout-tip,
.callout-success {
    --callout-accent: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.callout-warning,
.callout-caution {
    --callout-accent: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.callout-danger,
.callout-important {
    --callout-accent: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.callout-example,
.callout-abstract {
    --callout-accent: #8b5cf6;
    background: rgba(139, 92, 246, 0.05);
}

[data-theme="dark"] .callout {
    background: rgba(15, 23, 42, 0.75);
    box-shadow: none;
}

[data-theme="dark"] .callout-info {
    background: rgba(59, 130, 246, 0.1);
}

[data-theme="dark"] .callout-note {
    background: rgba(99, 102, 241, 0.1);
}

[data-theme="dark"] .callout-tip,
[data-theme="dark"] .callout-success {
    background: rgba(16, 185, 129, 0.1);
}

[data-theme="dark"] .callout-warning,
[data-theme="dark"] .callout-caution {
    background: rgba(245, 158, 11, 0.1);
}

[data-theme="dark"] .callout-danger,
[data-theme="dark"] .callout-important {
    background: rgba(239, 68, 68, 0.1);
}

[data-theme="dark"] .callout-example,
[data-theme="dark"] .callout-abstract {
    background: rgba(139, 92, 246, 0.1);
}

[data-theme="dark"] .callout-title {
    color: var(--callout-accent);
}

.post-body code {
    background: var(--code-bg);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: #c7254e;
}

.post-body pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
    line-height: 1.5;
}

[data-theme="dark"] .post-body pre {
    background: #1e293b;
    border: 1px solid var(--border);
}

.post-body pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: 0.9rem;
}

/* Copy Code Button */
.copy-code-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.copy-code-button:hover {
    background: white;
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.copy-code-button.copied {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* Reading Progress Indicator */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    z-index: 1000;
    transition: width 0.1s ease;
    overflow: visible;
}

.reading-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        hsl(200, 70%, 50%),
        hsl(260, 70%, 50%)
    );
    animation: hue-shift 20s linear infinite;
}

@keyframes hue-shift {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Related Posts Section - 3 Column Layout */
.related-posts-section {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 2rem;
    border-top: 2px solid var(--border);
}

.related-posts-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-bottom: 1rem;
}

@media (max-width: 1024px) {
    .related-posts-columns {
        grid-template-columns: 1fr;
    }
}

.related-posts-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 0 2rem;
    border-right: 1px solid var(--border);
}

.related-posts-column:first-child {
    padding-left: 0;
}

.related-posts-column:last-child {
    border-right: none;
    padding-right: 0;
}

@media (max-width: 1024px) {
    .related-posts-column {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 2rem 0;
    }

    .related-posts-column:last-child {
        border-bottom: none;
    }
}

.related-posts-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0;
    font-family: 'Libre Baskerville', Georgia, serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.related-post-card {
    padding: 0;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-post-card:hover {
    transform: translateX(4px);
}

.related-post-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: 'Libre Baskerville', Georgia, serif;
    line-height: 1.3;
}

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

.related-post-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.related-post-author {
    color: var(--accent-color);
}

.related-post-summary {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Social Sharing */
.social-sharing {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem;
    border-top: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
}

.social-sharing-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

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

.social-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--surface);
    color: var(--text-primary);
    border: 2px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.social-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.social-button.twitter {
    border-color: #1DA1F2;
    color: #1DA1F2;
}

.social-button.twitter:hover {
    background: #1DA1F2;
    color: white;
}

.social-button.linkedin {
    border-color: #0A66C2;
    color: #0A66C2;
}

.social-button.linkedin:hover {
    background: #0A66C2;
    color: white;
}

.social-button.email {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.social-button.email:hover {
    background: var(--accent-color);
    color: white;
}

.social-button svg {
    width: 18px;
    height: 18px;
}

/* Math */
.katex-display {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem 0;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 2rem;
    margin: 2rem auto;
    max-width: 900px;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border);
}

.back-link svg {
    transition: transform 0.2s ease;
}

.back-link:hover {
    color: var(--accent-color);
}

.back-link:hover svg {
    transform: translateX(-3px);
}

/* Footer */
.site-footer {
    margin-top: 4rem;
    padding: 2rem 2rem 3rem;
    background: #1a1a1a;
    border-top: 4px solid #1a1a1a;
    color: white;
}

[data-theme="dark"] .site-footer {
    background: #0a0e1a;
    border-top-color: #0a0e1a;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.footer-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    font-family: 'Libre Baskerville', Georgia, serif;
}

.footer-links-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-value-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    font-family: 'Libre Baskerville', Georgia, serif;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-value-link:hover {
    color: var(--accent-color);
}

/* Search Trigger */
.search-trigger {
    position: fixed;
    top: 1rem;
    right: 5rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 24px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: var(--shadow);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.search-trigger:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-lg);
}

.search-trigger svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.search-trigger kbd {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.15rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    font-family: 'Menlo', 'Monaco', monospace;
}

/* Search Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 10vh 2rem 2rem;
}

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

.search-container {
    background: var(--background);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.search-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-header svg {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1.25rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-close {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.search-close:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.search-results {
    padding: 1rem;
    overflow-y: auto;
    max-height: calc(80vh - 100px);
}

.search-result {
    display: block;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.search-result:hover {
    background: var(--surface);
    border-color: var(--border);
    transform: translateX(4px);
}

.search-result-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: 'Libre Baskerville', Georgia, serif;
}

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

.search-result-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-result-author {
    color: var(--accent-color);
    font-weight: 600;
}

.search-result-summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.search-no-results {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.search-no-results p {
    font-size: 1.1rem;
    margin: 0;
}

/* Highlight matching text */
mark {
    background: rgba(59, 130, 246, 0.2);
    color: inherit;
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
}

[data-theme="dark"] mark {
    background: rgba(96, 165, 250, 0.3);
}

/* Dark Mode Toggle */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.theme-toggle:hover {
    transform: rotate(180deg);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-lg);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
    transition: transform 0.3s ease;
}

/* Hide sun in dark mode, moon in light mode */
[data-theme="light"] .theme-toggle .moon-icon {
    display: block;
}

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

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

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

/* Responsive */
@media (max-width: 1200px) {
    .magazine-layout {
        grid-template-columns: 150px 1fr;
        gap: 1.5rem;
    }

    .plasma-sidebar {
        height: 400px;
    }

    .magazine-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .post.lead-story {
        grid-column: span 4;
    }

    .post.lead-story .post-summary {
        column-count: 1;
    }

    .post.feature-2,
    .post.feature-3 {
        grid-column: span 2;
    }

    .post.column-2 {
        grid-column: span 2;
    }

    .post.column-1 {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .search-trigger {
        right: 4.5rem;
        padding: 0.5rem 0.75rem;
    }

    .search-trigger span {
        display: none;
    }

    .search-trigger kbd {
        display: none;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
    }

    .search-modal {
        padding: 2rem 1rem;
    }

    .search-container {
        max-height: 90vh;
    }

    .search-header {
        padding: 1rem;
    }

    .search-input {
        font-size: 1rem;
    }

    .period-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .period-title {
        font-size: 1.2rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .magazine-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .plasma-sidebar {
        height: 200px;
        position: relative;
        top: 0;
    }

    .magazine-grid {
        grid-template-columns: 1fr;
    }

    .post.lead-story,
    .post.feature-2,
    .post.feature-3,
    .post.column-2,
    .post.column-1,
    .post.brief {
        grid-column: span 1;
        grid-row: span 1;
    }

    .post.lead-story .post-title {
        font-size: 2rem;
    }

    .post.lead-story .post-summary {
        column-count: 1;
        font-size: 1rem;
    }

    .post.list-item {
        grid-column: span 1;
    }

    .list-link {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .site-title {
        font-size: 2rem;
    }

    .post-header .post-title {
        font-size: 2rem;
    }

    .post-body {
        padding: 1rem;
    }

    body {
        font-size: 16px;
    }
}

/* zkSecurity Services Signature */
.zksecurity-signature {
    margin: 2.5rem auto 2rem;
    max-width: 650px;
    padding: 1.25rem 1.75rem;
    background: var(--surface);
    border-left: 3px solid var(--accent-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.signature-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.signature-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.signature-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.signature-link:hover {
    color: var(--accent-hover);
}

@media (max-width: 768px) {
    .zksecurity-signature {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 1.25rem;
        gap: 0.75rem;
        margin: 2rem auto 1.5rem;
    }
}
