:root {
    --bg-primary: #ffffff;
    --text-primary: #191414;
    --text-secondary: #6a6a6a;
    --text-tertiary: #8e8e8e;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f5;
    --border-color: #e5e5e5;
    --accent-color: #000000;
    --accent-hover: #000000;
    --success-color: #000000;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shimmer-bg: #f0f0f0;
    --shimmer-wave: #e0e0e0;
}

/* (dark theme removed) */

/* General Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Circular', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1 {
    color: var(--text-primary);
    text-align: left;
    margin-bottom: 48px;
    font-weight: 700;
    font-size: 3rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Form Styles */
form {
    background-color: var(--bg-secondary);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 20px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 16px;
    background-color: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

button[type="submit"] {
    background-color: var(--success-color);
    color: white;
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    margin-top: 10px;
    transition: background-color 0.2s ease, border 0.2s ease;
}

button[type="submit"]:hover {
    background-color: #38a169;
    border: 2px solid #2d5a3d;
}

button[type="submit"]:active {
    transform: translateY(0);
}

/* Toolbar Styles */
#toolbar {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#toolbar button {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.2s ease;
    font-weight: 500;
}

#toolbar button:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 0 1px var(--accent-color);
}

/* Editor Container */
.editor-container {
    width: 100%;
    padding: 20px;
}

/* For ultrawide devices, limit max width */
@media (min-width: 1920px) {
    .editor-container {
        max-width: 1920px;
        margin: 0 auto;
    }
}

.editor-header {
    margin-bottom: 30px;
}

.editor-header h1 {
    margin: 10px 0 0 0;
    font-size: 1.8em;
    color: #222222;
}

/* Page Editor */
.page-editor {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px;
    min-height: 600px;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.3s ease;
}

.page-editor:hover {
    box-shadow: var(--shadow-lg);
}

.page-title {
    border: none;
    font-size: 2em;
    font-weight: 600;
    width: 100%;
    margin-bottom: 20px;
    padding: 10px 0;
    background-color: transparent;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.page-title:focus {
    outline: none;
}

/* Editor toolbar styles moved to inline in create.html */

.page-content {
    min-height: 400px;
    padding: 0;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    outline: none;
    background: transparent;
    border: none;
}

.page-content:empty:before {
    content: 'Start writing your content here...';
    color: #999;
    opacity: 0.5;
    font-style: italic;
}

.page-content:focus {
    outline: none;
}

.page-content:focus:empty:before {
    content: '';
}

/* Editor Actions - styles moved to inline in create.html */

/* Docs Layout */
.docs-layout {
    display: grid;
    grid-template-columns: 1fr; /* single column layout: header on top, main below */
    grid-template-rows: auto 1fr auto; /* header, main, footer */
    min-height: 100vh;
    width: 100%;
    background-color: var(--bg-primary);
}

/* For ultrawide devices */
@media (min-width: 1920px) {
}

.sidebar-brand .hamburger {
    display: inline-block;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    margin-right: 8px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
}

.hamburger {
    display: none;
}

.docs-sidebar {
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 20px 0;
}

/* theme toggle removed */

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-brand {
    padding: 0;
    margin-bottom: 0;
}

.sidebar-brand h1 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sidebar-brand h1 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.sidebar-brand h1 a:hover {
    color: var(--accent-color);
}

/* Header nav styles (sidebar moved to header) */
.docs-header {
    grid-column: 1 / -1;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Mobile header hidden by default on desktop */
.mobile-header {
    display: none;
}

.header-nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
}

.header-nav-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-nav-list a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.header-nav-list a:hover {
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

/* Breadcrumb: show on mobile only */
.breadcrumb { display: none; color: #6b7280; font-size: 0.95em; }

/* Mobile header nav collapsed state */
.header-nav-list.collapsed {
    display: none;
}

/* When moved to header, remove old sidebar rules on desktop */
.docs-sidebar { display: none; }

.sidebar-nav li {
    margin-bottom: 4px;
}

.sidebar-nav a {
    display: block;
    padding: 8px 20px;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-nav a:hover {
    background-color: var(--bg-primary);
    color: var(--accent-color);
}

/* Expandable blog categories in sidebar */
.expandable {
    cursor: pointer;
}

.nested-categories {
    list-style: none;
    padding-left: 22px; /* increased left space for hierarchy */
    margin-top: 6px;
    display: none; /* collapsed by default */
}

.nested-categories li a {
    padding: 6px 20px;
    font-size: 13px;
    color: #6b7280;
}

.nested-categories li a:hover {
    color: var(--accent-color);
}

/* Mini popup for Blog subcategories */
.blog-popup {
    position: absolute;
    top: 42px;
    left: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    border-radius: var(--radius-md);
    min-width: 160px;
    z-index: 1400;
    display: none;
    animation: popupIn 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-popup ul { list-style: none; margin: 0; padding: 0; }
.blog-popup li { margin: 0; }
.blog-popup a { 
    display: block; 
    padding: 10px 12px; 
    color: var(--text-secondary); 
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}
.blog-popup a:hover { 
    background: var(--bg-secondary); 
    color: var(--accent-color);
    
}

.blog-popup.show { display: block; }

@keyframes popupIn {
    from { transform: translateY(-6px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.docs-main {
    background-color: var(--bg-primary);
    overflow-y: auto;
    /* make sure main content doesn't get pushed by hidden/removed sidebar */
    grid-column: 1 / -1;
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, #191414 0%, #2d2d2d 100%);
    padding: 80px 40px;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, rgba(29, 185, 84, 0.1) 1px, transparent 1px),
        linear-gradient(0deg, rgba(29, 185, 84, 0.1) 1px, transparent 1px);
    background-size: 100px 100px;
    animation: moveLines 20s linear infinite;
    pointer-events: none;
}

@keyframes moveLines {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(100px, 100px);
    }
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 32px;
    position: relative;
    z-index: 1;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #c3c3c3;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    margin-bottom: 18px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.03em;
    line-height: 1;
    white-space: nowrap;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #b3b3b3;
    margin: 0;
    line-height: 1.6;
}

.hero-banner-extended {
    padding-bottom: 80px;
}

.hero-latest-card {
    flex: 0 0 360px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 28px;
    min-height: 260px;
}

.hero-latest-label {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    color: #9ef5c0;
    margin: 0 0 12px 0;
}

.hero-latest-title {
    color: #ffffff;
    margin: 0 0 12px 0;
    font-size: 1.5rem;
    line-height: 1.3;
}

.hero-latest-excerpt {
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 20px 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.hero-latest-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #9ef5c0;
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.hero-latest-link:hover {
    gap: 10px;
}

.hero-posts-panel {
    max-width: 1200px;
    margin: 48px auto 0 auto;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 32px;
    padding: 32px 40px 40px;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(20px);
}

.hero-posts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.hero-posts-link {
    color: #9ef5c0;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.hero-posts-link:hover {
    color: #ffffff;
}

.hero-posts-container {
    margin: 0 -10px;
    padding: 0 10px 10px;
}

.content-after-hero {
    margin-top: 40px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 40px;
    letter-spacing: -0.02em;
}

.hero-posts-panel .section-title {
    color: #ffffff;
    margin-bottom: 0;
}

/* Posts Container with Horizontal Scroll */
.posts-container {
    margin-bottom: 64px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.posts-container::-webkit-scrollbar {
    height: 8px;
}

.posts-container::-webkit-scrollbar-track {
    background: transparent;
    margin: 0 20px;
}

.posts-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.posts-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

.posts-grid {
    display: flex;
    gap: 24px;
    padding-bottom: 16px;
    flex-wrap: nowrap;
}

/* Post Card Styles */
.post-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.2s ease;
    box-shadow: var(--shadow-sm);
    flex: 0 0 350px;
    width: 350px;
}

.hero-posts-panel .post-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

.hero-posts-panel .post-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.06) 100%);
    border-color: rgba(255, 255, 255, 0.5);
}

.post-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.post-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--bg-tertiary);
    position: relative;
}

.post-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.8em;
}

.hero-posts-panel .post-card-title {
    color: #ffffff;
}

.hero .post-card-excerpt {
    font-size: 0.75rem;
    color: #333333 !important;
    line-height: 1.6;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 6.4em;
}

.post-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.hero-posts-panel .post-card-meta {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.post-card-date {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.hero-posts-panel .post-card-date {
    color: rgba(255, 255, 255, 0.7);
}

.hero-posts-panel .post-card-excerpt {
    color: rgba(255, 255, 255, 0.85);
}

/* Shimmer Loading Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(
        90deg,
        var(--shimmer-bg) 0%,
        var(--shimmer-wave) 20%,
        var(--shimmer-bg) 40%,
        var(--shimmer-bg) 100%
    );
    background-size: 1000px 100%;
}

.hero-posts-panel .shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.15) 20%,
        rgba(255, 255, 255, 0.05) 40%,
        rgba(255, 255, 255, 0.05) 100%
    );
    background-size: 1000px 100%;
}

.shimmer-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    flex: 0 0 350px;
    width: 350px;
}

.hero-posts-panel .shimmer-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

.shimmer-thumbnail {
    width: 100%;
    height: 200px;
    background-color: var(--bg-tertiary);
}

.shimmer-content {
    padding: 20px;
}

.shimmer-title {
    height: 28px;
    background-color: var(--shimmer-bg);
    border-radius: 4px;
    margin-bottom: 12px;
    width: 80%;
}

.hero-posts-panel .shimmer-title {
    background-color: rgba(255, 255, 255, 0.1);
}

.shimmer-excerpt {
    height: 16px;
    background-color: var(--shimmer-bg);
    border-radius: 4px;
    margin-bottom: 8px;
}

.hero-posts-panel .shimmer-excerpt {
    background-color: rgba(255, 255, 255, 0.08);
}

.shimmer-excerpt:last-of-type {
    width: 60%;
    margin-bottom: 16px;
}

.shimmer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.hero-posts-panel .shimmer-meta {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.shimmer-date {
    height: 14px;
    width: 100px;
    background-color: var(--shimmer-bg);
    border-radius: 4px;
}

.hero-posts-panel .shimmer-date {
    background-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .hero-banner {
        padding: 60px 20px;
    }
    
    .hero-banner-extended {
        padding: 60px 0 40px 0;
    }
    
    .hero-content {
        flex-direction: column;
        gap: 16px;
        padding: 0 20px;
    }
    
    .hero-title {
        font-size: 2.5rem;
        white-space: normal;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-posts-panel {
        margin: 32px 0 0 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 28px 20px 32px;
        max-width: 100%;
    }
    
    .hero-posts-container {
        margin: 0;
        padding: 0 !important;
    }
    
    .post-card {
        flex: 0 0 260px;
        width: 260px;
    }
    
    .shimmer-card {
        flex: 0 0 260px;
        width: 260px;
    }
    
    .shimmer-thumbnail {
        height: 160px;
    }
    
    .post-card-thumbnail {
        height: 160px;
    }
    
    .post-card-content {
        padding: 16px;
    }
    
    .post-card-title {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .post-card-excerpt {
        font-size: 0.875rem;
        margin-bottom: 12px;
    }
    
    .post-card-date {
        font-size: 0.8rem;
    }
}

.content:not(.content-with-sidebar) {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 40px;
}

.post-detail {
    max-width: 720px;
}

.content-with-sidebar .post-detail {
    max-width: 100%;
}

@media (max-width: 768px) {
    .content:not(.content-with-sidebar) {
        padding: 60px 20px;
    }
}.content h1 {
    font-size: 2em;
    color: var(--text-primary);
    margin-bottom: 30px;
    font-weight: 600;
    text-align: left;
}

/* Posts Styles */
.posts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 32px;
    margin-bottom: 64px;
}

.posts-list > div {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.posts-list > div:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.posts-list h2 {
    color: var(--text-primary);
    margin: 0 0 16px 0;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.posts-list h2 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.posts-list > div > div {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.posts-list small {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.post-detail h1 {
    font-size: 3rem;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.post-meta {
    margin-bottom: 48px;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 0;
    font-weight: 500;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-date {
    margin-top: 40px;
    color: #6b7280;
    font-size: 14px;
    font-style: italic;
}

.docs-footer {
    grid-column: 1 / -1;
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 48px 40px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.footer-content a {
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

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

.about-content img {
    max-width: 100%;
    height: auto;
    max-height: 50vh;
    cursor: pointer;
    display: block;
    margin: 20px auto;
}

.about-content img.image-small {
    width: 300px;
}

.about-content img.image-medium {
    width: 600px;
}

.post-content img.image-large {
    width: 100%;
}

.post-content p {
    line-height: 1.7;
}

.about-content p {
    margin-bottom: 24px;
    color: var(--text-primary);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .about-content {
        padding: 0;
    }
}

.about-content h1 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: left;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.about-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 32px;
    text-align: left;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* Post content headings */
.post-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 2.5em;
    margin-bottom: 1em;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.post-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 0.875em;
    color: var(--text-primary);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.post-content h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.75em;
    margin-bottom: 0.75em;
    color: var(--text-primary);
    line-height: 1.3;
}

.post-content h5 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: var(--text-primary);
    line-height: 1.4;
}

.resume-content p {
    margin-bottom: 24px;
    color: var(--text-primary);
    line-height: 1.7;
}

.post-content p {
    line-height: 1.8;
    margin-bottom: 1.5em;
    color: var(--text-primary);
    font-size: 1.0625rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    max-height: 50vh;
    cursor: pointer;
    display: block;
    margin: 20px auto;
}

.post-content img.image-small {
    width: 300px;
}

.post-content img.image-medium {
    width: 600px;
}

.post-content img.image-large {
    width: 100%;
}

/* Modal for image detail view */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    width: 80vw;
    height: 80vh;
    overflow: visible;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: center;
}

.zoom-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.zoom-controls button {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 5px;
}

.zoom-controls button:hover {
    background: rgba(255, 255, 255, 1);
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    /* Prevent horizontal overflow that was causing content to spill right */
    html, body {
        max-width: 100%;
        overflow-x: hidden;
    }

    h1 {
        font-size: 1.8em;
    }

    form {
        padding: 20px;
    }

    /* Toolbar: wrap buttons for small screens */
    #toolbar {
        justify-content: flex-start;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    #toolbar button {
        padding: 10px 12px;
        font-size: 14px;
        min-height: 44px;
        min-width: 44px;
        box-sizing: border-box;
    }

    /* Editor content spacing */
    #content {
        min-height: 320px;
        padding: 16px;
    }

    /* Post cards: single column and comfortable padding */
    #posts > div {
        padding: 18px;
        margin: 12px 12px;
    }
}

/* Code blocks */
pre {
    background-color: #2d3748;
    color: #e2e8f0;
    border: 1px solid #4a5568;
    border-radius: var(--radius-md);
    padding: 20px;
    overflow-x: auto;
    font-family: 'Roboto Mono', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    margin: 24px 0;
    position: relative;
    box-shadow: var(--shadow-md);
}

pre::before {
    content: "Code";
    position: absolute;
    top: 8px;
    right: 12px;
    background-color: #4a5568;
    color: #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: #4a5568;
    color: #e2e8f0;
    border: 1px solid #5a6578;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background-color: #5a6578;
    transform: translateY(-1px);
}

code {
    font-family: 'Roboto Mono', 'Courier New', monospace;
    background-color: var(--bg-tertiary);
    color: var(--accent-color);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.88em;
    border: 1px solid var(--border-color);
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: inherit;
    border: none;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .docs-layout {
        display: block;
    }

    /* Sidebar becomes a sliding panel that covers most of the screen */
    .docs-sidebar {
        position: fixed;
        top: 0;
        left: -80vw;
        width: 80vw;
        max-width: 360px;
        height: 100vh;
        z-index: 1200;
        transition: left 0.28s ease;
        background-color: var(--bg-secondary);
        border-right: 1px solid var(--border-color);
        padding: 16px 0;
    }

    .docs-sidebar.open {
        left: 0;
    }

    .docs-main {
        width: 100%;
        padding: 12px 14px;
    }

    .hamburger {
        display: block;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: var(--text-primary);
        margin-right: 10px;
    }

    /* Mobile-specific header: show breadcrumb & site name, hide full nav */
    .header-nav {
        padding: 8px 12px;
        align-items: center;
    }

    .mobile-header {
        display: flex;
        align-items: center;
        width: 100%;
        gap: 8px;
    }

    .mobile-header .brand-title {
        font-size: 1.05em;
        font-weight: 600;
        color: var(--text-primary);
    }

    .breadcrumb { display: none; }

    /* Hide desktop brand on mobile and show the simplified mobile header */
    .sidebar-brand { display: none !important; }
    .mobile-header { display: flex !important; }

    /* Mobile navigation menu */
    .header-nav-list {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
        z-index: 99;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .header-nav-list ul {
        flex-direction: column;
        padding: 12px 20px;
        gap: 0;
    }
    
    .header-nav-list li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .header-nav-list li:last-child {
        border-bottom: none;
    }
    
    .header-nav-list a {
        display: block;
        padding: 14px 0;
    }

    /* Ensure main content doesn't exceed viewport width */
    .docs-main {
        padding: 0;
    }
    
    .content:not(.content-with-sidebar) {
        box-sizing: border-box;
        max-width: 100%;
        overflow-wrap: break-word;
        word-break: break-word;
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .posts-list {
        padding-left: 0;
        padding-right: 0;
    }
    
    .posts-list > div {
        margin-left: 0;
        margin-right: 0;
    }
    
    .page-editor {
        box-sizing: border-box;
        max-width: 100%;
        padding: 24px 20px;
    }

    .header-content {
        display: flex;
        align-items: center;
        height: auto;
        padding: 10px;
    }

    .header-content h1 {
        margin: 0;
        font-size: 1.2em;
    }

    .header-content nav {
        margin-left: auto;
    }

    .header-content nav a {
        margin-left: 15px;
    }
}

/* Mobile: make posts list single column and playlist responsive */
@media (max-width: 768px) {
    .posts-list {
        display: block;
    }

    .posts-list > div {
        margin: 10px 0;
        border-radius: 8px;
    }

    .playlist-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .playlist-item {
        width: 100%;
        max-width: 100%;
        aspect-ratio: 1;
        margin: 0 auto 12px auto;
        box-shadow: none;
    }

    .sidebar-nav a {
        padding: 12px 18px;
        font-size: 15px;
    }

    .sidebar-brand {
        position: sticky;
        top: 0;
        background: var(--bg-secondary);
        z-index: 1250;
        padding-top: 12px;
    }
}

/* Playlist styles */
.playlist-section {
    margin-top: 40px;
}

.playlist-section h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
}

.playlist-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.playlist-item {
    position: relative;
    width: 350px;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 20px rgba(74, 144, 226, 0.3);
    animation: float 3s ease-in-out infinite;
    transition: box-shadow 0.3s ease;
    margin-bottom: 20px;
}

.playlist-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 0 30px rgba(74, 144, 226, 0.5), 0 0 0 2px rgba(74, 144, 226, 0.3);
}

.playlist-item:nth-child(odd) {
    animation-delay: 0s;
}

.playlist-item:nth-child(even) {
    animation-delay: 1.5s;
}

.playlist-item:nth-child(3n) {
    animation-delay: 0.5s;
}

.playlist-item:nth-child(4n) {
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.playlist-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.playlist-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.playlist-item:hover .playlist-info {
    opacity: 1;
}

.playlist-info h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: white;
}

.playlist-info a {
    color: #4a90e2;
    text-decoration: none;
    font-size: 12px;
}

.playlist-info a:hover {
    text-decoration: underline;
}

/* Futuristic playlist page */
.playlist-content {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(129, 90, 245, 0.1));
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.playlist-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(74, 144, 226, 0.1), transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(129, 90, 245, 0.1), transparent 50%);
    pointer-events: none;
}

.scrolling-playlist {
    display: flex;
    min-height: 1000px;
    overflow: hidden;
    position: relative;
    padding: 20px;
    justify-content: center;
    margin: 0 auto;
    max-width: 720px;
}



.scroll-column {
    flex: 1;
    min-width: 380px;
    display: flex;
    flex-direction: column;
    animation: scrollUp 240s linear infinite;
    animation-play-state: running;
}

.right-column {
    animation: scrollDown 240s linear infinite;
    animation-play-state: running;
}

/* Pause parent column animation when any child item is hovered */
.scroll-column:has(.playlist-item:hover),
.right-column:has(.playlist-item:hover) {
    animation-play-state: paused;
}

@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

@keyframes scrollDown {
    0% {
        transform: translateY(-50%);
    }
    100% {
        transform: translateY(0);
    }
}
