/* ============================================
   Custom Styles for Pluggedspace Blog
   Professional Design System
   ============================================ */

/* ============================================
   CSS Variables & Design Tokens
   ============================================ */

:root {
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-serif: Georgia, Cambria, "Times New Roman", Times, serif;
    --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;

    /* Font Sizes - Professional Scale */
    --text-xs: 0.75rem;
    /* 12px */
    --text-sm: 0.875rem;
    /* 14px */
    --text-base: 1rem;
    /* 16px */
    --text-lg: 1.125rem;
    /* 18px */
    --text-xl: 1.25rem;
    /* 20px */
    --text-2xl: 1.5rem;
    /* 24px */
    --text-3xl: 1.875rem;
    /* 30px */
    --text-4xl: 2.25rem;
    /* 36px */
    --text-5xl: 3rem;
    /* 48px */

    /* Spacing */
    --content-gap: 60px;
    --section-gap: 80px;
    --nav-width: 100%;
    --main-width: 1400px;
    --content-width: 1200px;

    /* Colors - Light Theme */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --accent-color: #10b981;
    --text-color: #111827;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --border-color: #e5e7eb;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --header-bg: #ffffff;
    --header-border: #e5e7eb;
}

/* ============================================
   Global Resets & Base Styles
   ============================================ */

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-lg);
    line-height: 1.7;
    letter-spacing: -0.01em;
    color: var(--text-color);
    background: var(--bg-white);
}

/* Force light theme */
.main,
body,
header,
nav {
    background: var(--bg-white) !important;
    color: var(--text-color) !important;
}

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

.header,
header.header {
    background: var(--header-bg) !important;
    border-bottom: 1px solid var(--header-border) !important;
    padding: 1.5rem 0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.nav,
nav {
    background: transparent !important;
    max-width: var(--main-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.logo,
.logo a {
    font-size: var(--text-2xl) !important;
    font-weight: 700 !important;
    color: var(--text-color) !important;
    letter-spacing: -0.02em;
}

.menu a,
#menu a {
    font-size: var(--text-base) !important;
    font-weight: 500 !important;
    color: var(--text-color) !important;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s ease;
}

.menu a:hover,
#menu a:hover {
    color: var(--primary-color) !important;
}

/* ============================================
   Main Container & Layout
   ============================================ */

.main,
main {
    max-width: var(--main-width);
    margin: 0 auto;
    padding: var(--section-gap) 2rem;
    background: var(--bg-white) !important;
}

.list .main {
    padding: 3rem 2rem;
}

/* ============================================
   Home Info Section
   ============================================ */

.home-info {
    text-align: center;
    padding: 4rem 0;
    margin-bottom: 4rem;
}

.home-info .profile_inner h1 {
    font-size: var(--text-5xl);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    color: var(--text-color);
}

.home-info .profile_inner .subtitle {
    font-size: var(--text-xl);
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--text-color);
}

.post-content h1 {
    font-size: var(--text-4xl);
    margin-top: 2.5em;
    margin-bottom: 1em;
}

.post-content h2 {
    font-size: var(--text-3xl);
    margin-top: 2em;
    margin-bottom: 0.75em;
    padding-bottom: 0.5em;
    border-bottom: 2px solid var(--border-color);
}

.post-content h3 {
    font-size: var(--text-2xl);
    margin-top: 1.75em;
    margin-bottom: 0.75em;
}

.post-content h4 {
    font-size: var(--text-xl);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

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

/* ============================================
   Masonry Grid Layout - Full Width
   ============================================ */

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2.5rem;
    margin: 0;
    padding: 0;
    width: 100%;
}

@media (min-width: 768px) {
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .masonry-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
}

@media (min-width: 1400px) {
    .masonry-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
}

/* ============================================
   Post Cards - Modern Design
   ============================================ */

.post-entry {
    position: relative;
    border-radius: 16px;
    padding: 0;
    margin: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: var(--bg-white);
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.post-entry:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.post-entry .entry-header {
    padding: 2rem 2rem 1rem;
}

.post-entry .entry-content {
    padding: 0 2rem 1.5rem;
    flex-grow: 1;
}

.post-entry .entry-footer {
    padding: 0 2rem 2rem;
    margin-top: auto;
}

.entry-header h2 {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    transition: color 0.2s ease;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--text-color);
}

.post-entry:hover .entry-header h2 {
    color: var(--primary-color);
}

.entry-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Cover Image in Cards */
.post-entry .entry-cover {
    margin: 0;
    border-radius: 0;
    overflow: hidden;
}

.post-entry .entry-cover img {
    margin: 0;
    border-radius: 0;
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-entry:hover .entry-cover img {
    transform: scale(1.05);
}

.entry-content p {
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
    font-size: var(--text-base);
}

/* Entry Footer / Meta */
.entry-footer {
    font-size: var(--text-sm);
    color: var(--text-light);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

/* ============================================
   Article Page
   ============================================ */

.post-header {
    margin-bottom: 3rem;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.post-title {
    font-size: var(--text-5xl);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.post-meta {
    font-size: var(--text-base);
    color: var(--text-muted);
}

.post-content {
    max-width: 800px;
    margin: 0 auto;
}

/* ============================================
   Code Blocks
   ============================================ */

.post-content pre {
    border-radius: 12px;
    padding: 1.5em;
    margin: 2em 0;
    overflow-x: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    font-size: var(--text-base);
}

.post-content code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    padding: 0.2em 0.4em;
    background: var(--bg-light);
    border-radius: 4px;
}

.post-content pre code {
    padding: 0;
    background: transparent;
}

/* ============================================
   Links
   ============================================ */

.post-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    font-weight: 500;
}

.post-content a:hover {
    color: var(--primary-hover);
    border-bottom-color: var(--primary-hover);
}

/* ============================================
   Blockquotes
   ============================================ */

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1.5em 2em;
    margin: 2em 0;
    font-style: italic;
    color: var(--text-muted);
    background: var(--bg-light);
    border-radius: 0 12px 12px 0;
    font-size: var(--text-lg);
}

/* ============================================
   Images
   ============================================ */

.post-content img {
    border-radius: 12px;
    margin: 2em 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    height: auto;
}

/* ============================================
   Tags & Categories
   ============================================ */

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

.post-tags a {
    background: var(--bg-light);
    color: var(--text-color);
    padding: 0.5em 1em;
    border-radius: 8px;
    font-size: var(--text-sm);
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    font-weight: 500;
}

.post-tags a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

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

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.pagination a {
    padding: 0.75rem 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--text-base);
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
}

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

#searchResults {
    margin-top: 2em;
}

#searchResults li {
    padding: 1.5em;
    margin-bottom: 1em;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

#searchResults li:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

.footer {
    margin-top: 6rem;
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    text-align: center;
    font-size: var(--text-base);
}

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

@media (max-width: 768px) {
    :root {
        --text-5xl: 2.25rem;
        --text-4xl: 1.875rem;
        --text-3xl: 1.5rem;
        --text-2xl: 1.25rem;
    }

    .main,
    main {
        padding: 2rem 1rem;
    }

    .nav {
        padding: 0 1rem;
    }

    .post-entry .entry-header,
    .post-entry .entry-content,
    .post-entry .entry-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .home-info {
        padding: 2rem 0;
        margin-bottom: 2rem;
    }
}

/* ============================================
   Animations
   ============================================ */

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-entry {
    animation: fadeIn 0.5s ease-out;
}

/* ============================================
   Utilities
   ============================================ */

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

.mt-4 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

/* Single Post Cover Image Adjustment */
.post-single .entry-cover {
    margin: 2rem auto;
    max-width: 900px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.post-single .entry-cover img {
    max-height: 500px;
    width: 100%;
    object-fit: cover;
    margin: 0;
}

/* ============================================
   Comments
   ============================================ */

.comments {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    height: 100%;
}

#cusdis_thread {
    width: 100%;
    height: 100%;
}

.comments-title h3 {
    font-size: var(--text-2xl);
    margin-bottom: 1.5rem;
}