/*
Theme Name: Zwiegnet Blog
Theme URI: https://zwiegnet.com
Author: Zwiegnet
Description: Custom WordPress blog theme matching the zwiegnet.com brand — Linux/UNIX consulting aesthetic with JetBrains Mono + Inter, dark background, terminal-green accents.
Version: 1.0
Requires PHP: 7.4
Text Domain: zwiegnet-blog
*/

:root {
    --primary: #00ff9d;
    --primary-dark: #00cc7a;
    --accent: #0f8c94;
    --bg-dark: #0d1117;
    --bg-code: #161b22;
    --text: #c9d1d9;
    --text-muted: #8b949e;
    --border: #30363d;
    --header-height: 90px;
}

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

html, body {
    height: 100%;
    background: var(--bg-dark);
    color: var(--text);
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header.site-header {
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo img { height: 60px; width: auto; }

.site-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.nav-menu { display: block; }

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

.nav-menu ul ul { display: none; }

.nav-menu a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-menu a:hover,
.nav-menu a.current-menu-item,
.nav-menu .current_page_item > a {
    background: var(--primary);
    color: var(--bg-dark);
}

.menu-item-has-children { position: relative; }

.menu-item-has-children > ul.sub-menu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 220px;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 999;
    gap: 0;
}

.menu-item-has-children:hover > ul.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu a { padding: 0.8rem 1.2rem; display: block; }
.sub-menu a:hover { background: var(--primary); color: var(--bg-dark); }

/* Page hero (blog title / archive header) */
.page-hero {
    padding: 4rem 0 3rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-dark);
    text-align: center;
}

.page-hero h1 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.6rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.page-hero p { color: var(--text-muted); font-size: 1.1rem; }

/* Content layout */
.site-content { padding: 4rem 0; }

.content-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
}

@media (max-width: 968px) {
    .content-layout { grid-template-columns: 1fr; }
}

/* Post cards (blog list) */
.post-list { display: flex; flex-direction: column; gap: 2.5rem; }

.post-card {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    transition: all 0.4s;
}

.post-card:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0,255,157,0.12);
}

.post-card .post-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.post-card .post-meta a { color: var(--text-muted); }

.post-card h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.post-card h2 a { color: var(--primary); text-decoration: none; }
.post-card h2 a:hover { text-decoration: underline; }

.post-card .excerpt { color: var(--text-muted); margin-bottom: 1.25rem; }

.post-card .thumb {
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

/* Single post */
.single-post h1.entry-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.entry-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.entry-content { font-size: 1.05rem; }

.entry-content h2, .entry-content h3, .entry-content h4 {
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary);
    margin: 2rem 0 1rem;
}

.entry-content p { margin-bottom: 1.4rem; }

.entry-content pre, .entry-content code {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.entry-content code { padding: 0.15rem 0.4rem; font-size: 0.9em; }

.entry-content pre {
    padding: 1.25rem;
    overflow-x: auto;
    margin-bottom: 1.4rem;
}

.entry-content pre code { border: none; padding: 0; background: none; }

.entry-content blockquote {
    border-left: 3px solid var(--primary);
    padding-left: 1.25rem;
    color: var(--text-muted);
    margin: 1.5rem 0;
}

.entry-content ul, .entry-content ol { margin: 0 0 1.4rem 1.5rem; }
.entry-content img { border-radius: 12px; margin: 1.5rem 0; }

.entry-content a { text-decoration: underline; }

.entry-tags {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.entry-tags a {
    display: inline-block;
    background: var(--bg-code);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    margin: 0.25rem 0.4rem 0.25rem 0;
    text-decoration: none;
}

.entry-tags a:hover { border-color: var(--primary); color: var(--primary); }

/* Pagination */
.pagination {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 3rem;
    font-family: 'JetBrains Mono', monospace;
}

.pagination a, .pagination span {
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
}

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

/* Sidebar */
.widget {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
    margin-bottom: 2rem;
}

.widget-title {
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.widget ul { list-style: none; }
.widget li { margin-bottom: 0.6rem; }
.widget a { color: var(--text-muted); text-decoration: none; }
.widget a:hover { color: var(--primary); }

/* Buttons */
.btn {
    display: inline-block;
    background: var(--primary);
    color: var(--bg-dark);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(0,255,157,0.4);
}

.btn:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0,255,157,0.6);
}

/* Comments */
.comments-area { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.comment-list { list-style: none; }
.comment-body {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.comment-form input, .comment-form textarea {
    width: 100%;
    background: var(--bg-code);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
}
.comment-form input[type="submit"] {
    width: auto;
    background: var(--primary);
    color: var(--bg-dark);
    font-weight: 600;
    border: none;
    cursor: pointer;
}

/* Footer */
footer.site-footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    text-align: center;
    padding: 3rem 0;
    font-size: 1rem;
}

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

/* Mobile */
@media (max-width: 968px) {
    .hamburger { display: flex; }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 280px;
        background: var(--bg-dark);
        padding: 100px 30px 40px;
        transition: right 0.4s ease;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
        z-index: 9999;
        overflow-y: auto;
    }

    .nav-menu.active { right: 0; }
    .nav-menu ul { flex-direction: column; gap: 1rem; align-items: flex-start; }
    .menu-item-has-children > ul.sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        border: none;
        box-shadow: none;
        padding-left: 1rem;
    }
    .menu-item-has-children.active > ul.sub-menu { display: flex; flex-direction: column; }

    .page-hero h1 { font-size: 2rem; }
    .single-post h1.entry-title { font-size: 2.1rem; }
}
