/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --color-bg: #ffffff;
    --color-surface: #f8f9fa;
    --color-border: #e9ecef;
    --color-text: #212529;
    --color-text-muted: #6c757d;
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-accent: #7c3aed;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-width: 1100px;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,.1);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--color-primary-hover); }

img { max-width: 100%; height: auto; display: block; }

/* === Header === */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.site-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-text);
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 0.25rem;
}

.nav-list li a {
    display: block;
    padding: 0.5rem 0.85rem;
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: .9rem;
    border-radius: 8px;
    transition: background .2s, color .2s;
}

.nav-list li a:hover,
.nav-list li.current-menu-item a {
    background: var(--color-surface);
    color: var(--color-primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
}

/* === Hero === */
.hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
    color: #fff;
    padding: 5rem 1.5rem;
    text-align: center;
}

.hero-inner { max-width: 700px; margin: 0 auto; }

.hero-title {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: .85;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-cta {
    display: inline-block;
    padding: .75rem 2rem;
    background: #fff;
    color: #4338ca;
    font-weight: 600;
    border-radius: 8px;
    transition: transform .2s, box-shadow .2s;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,.2);
    color: #312e81;
}

/* === Sections (Software/Games/Misc) === */
.sections {
    padding: 4rem 1.5rem;
    background: var(--color-surface);
}

.sections-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.section-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform .25s, box-shadow .25s;
}

.section-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.section-icon { font-size: 2.5rem; margin-bottom: 1rem; }

.section-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: .75rem;
}

.section-desc {
    color: var(--color-text-muted);
    font-size: .95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.section-btn {
    display: inline-block;
    padding: .6rem 1.5rem;
    background: var(--color-primary);
    color: #fff;
    border-radius: 8px;
    font-weight: 500;
    font-size: .9rem;
    transition: background .2s, transform .2s;
}

.section-btn:hover {
    background: var(--color-primary-hover);
    color: #fff;
    transform: translateY(-1px);
}

/* === Latest Posts === */
.latest-posts {
    padding: 4rem 1.5rem;
}

.latest-inner { max-width: var(--max-width); margin: 0 auto; }

.section-heading {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
}

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

.post-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .25s, box-shadow .25s;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.post-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.post-content { padding: 1.25rem; }

.post-meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .8rem;
    color: var(--color-text-muted);
    margin-bottom: .5rem;
}

.post-cat {
    background: var(--color-surface);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.post-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: .5rem;
    line-height: 1.3;
}

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

.post-excerpt {
    font-size: .9rem;
    color: var(--color-text-muted);
    margin-bottom: .75rem;
    line-height: 1.5;
}

.post-link {
    font-size: .85rem;
    font-weight: 500;
}

.no-posts {
    text-align: center;
    color: var(--color-text-muted);
    grid-column: 1 / -1;
    padding: 3rem;
}

.view-all { text-align: center; margin-top: 2rem; }

.view-all-btn {
    display: inline-block;
    padding: .6rem 1.5rem;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 8px;
    font-weight: 500;
    transition: background .2s, color .2s;
}

.view-all-btn:hover {
    background: var(--color-primary);
    color: #fff;
}

/* === Single Post === */
.single-content, .page-content, .archive-content, .search-content {
    padding: 3rem 1.5rem;
}

.content-inner { max-width: var(--max-width); margin: 0 auto; }

.single-header { margin-bottom: 2rem; }

.single-meta {
    display: flex;
    gap: .75rem;
    font-size: .85rem;
    color: var(--color-text-muted);
    margin-bottom: .5rem;
}

.single-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
}

.single-thumb { margin-bottom: 2rem; border-radius: var(--radius); overflow: hidden; }
.single-thumb img { width: 100%; }

.single-body {
    font-size: 1.05rem;
    line-height: 1.8;
}

.single-body p { margin-bottom: 1.25rem; }
.single-body h2, .single-body h3 { margin: 2rem 0 1rem; }
.single-body ul, .single-body ol { margin: 1rem 0; padding-left: 1.5rem; }
.single-body blockquote {
    border-left: 3px solid var(--color-primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--color-surface);
    border-radius: 0 8px 8px 0;
}

.single-tags { margin-top: 2rem; display: flex; gap: .5rem; flex-wrap: wrap; }

.tag-link {
    display: inline-block;
    padding: 4px 12px;
    background: var(--color-surface);
    border-radius: 6px;
    font-size: .8rem;
    color: var(--color-text-muted);
}

.post-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    font-size: .9rem;
}

.archive-header { margin-bottom: 2rem; }
.archive-title { font-size: 1.75rem; font-weight: 700; }
.archive-desc { color: var(--color-text-muted); margin-top: .5rem; }

.pagination { margin-top: 3rem; text-align: center; }

/* === Footer === */
.site-footer {
    background: #1e1b4b;
    color: #c7d2fe;
    padding: 3rem 1.5rem 1.5rem;
}

.footer-inner { max-width: var(--max-width); margin: 0 auto; }

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.footer-name { font-size: 1.2rem; font-weight: 600; color: #fff; }
.footer-tagline { font-size: .85rem; opacity: .7; margin-top: .25rem; }

.footer-nav-list {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.footer-nav-list a {
    color: #a5b4fc;
    font-size: .9rem;
    transition: color .2s;
}

.footer-nav-list a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: .8rem;
    opacity: .6;
}

/* === Responsive === */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--color-border);
        padding: 1rem;
        box-shadow: var(--shadow-lg);
    }

    .main-nav.active { display: block; }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-list li a {
        padding: .75rem 1rem;
        border-radius: 8px;
    }

    .hero { padding: 3rem 1.5rem; }
    .hero-title { font-size: 1.8rem; }

    .sections-inner { grid-template-columns: 1fr; }
    .posts-grid { grid-template-columns: 1fr; }

    .footer-content { flex-direction: column; gap: 1.5rem; }
    .footer-nav-list { flex-wrap: wrap; gap: 1rem; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.5rem; }
    .single-title { font-size: 1.6rem; }
}
