/*
Theme Name: MikesCyberSecurity
Theme URI: https://mikescybersecurity.com
Description: Dark RE-inspired theme with Ghidra color palette
Version: 1.0
Author: Mike
*/

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

:root {
    --bg-primary: #111111;
    --bg-secondary: #1a1a1a;
    --bg-code: #0d0d0d;
    --text-primary: #d4d4d4;
    --text-secondary: #888888;
    --text-muted: #555555;
    --ghidra-red: #CC0000;
    --ghidra-orange: #E85D00;
    --ghidra-yellow: #FFB800;
    --ghidra-light-red: #E63946;
    --link-color: #E85D00;
    --link-hover: #FFB800;
    --border-color: #2a2a2a;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --content-width: 900px;
    --header-width: 1100px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

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

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

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

::selection {
    background: var(--ghidra-orange);
    color: #111111;
}

/* ========== HEADER / NAV ========== */
.site-header {
    padding: 2rem 3rem;
    max-width: var(--header-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.site-logo a {
    color: var(--text-secondary);
}

.site-logo a:hover {
    color: var(--ghidra-orange);
}

.site-nav {
    display: flex;
    gap: 2rem;
}

.site-nav a {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: lowercase;
}

.site-nav a:hover {
    color: var(--ghidra-orange);
}

/* ========== HERO / TAGLINE ========== */
.hero {
    max-width: var(--header-width);
    margin: 0 auto;
    padding: 6rem 3rem 5rem;
}

.tagline {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    padding-left: 5%;
}

.tagline .line-1 {
    display: block;
    color: var(--text-primary);
}

.tagline .line-2 {
    display: block;
    padding-left: 1.5em;
    color: var(--ghidra-orange);
}

/* ========== DECORATIVE DOTS ========== */
.post-list-container {
    position: relative;
    max-width: var(--header-width);
    margin: 0 auto;
    padding: 0 3rem 4rem;
}

/* ========== POST LIST (homepage) ========== */
.post-list {
    list-style: none;
    border-top: 1px solid var(--border-color);
}

.post-list-item {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: 1.5rem;
    align-items: baseline;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}

.post-list-item:hover {
    background: var(--bg-secondary);
}

.post-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.post-title-link {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.post-title-link:hover {
    color: var(--ghidra-orange);
}

.post-categories {
    display: flex;
    gap: 0.5rem;
}

.post-category {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--ghidra-red);
    background: rgba(204, 0, 0, 0.1);
    padding: 0.15em 0.5em;
    border-radius: 2px;
    text-transform: lowercase;
}

/* ========== SINGLE POST ========== */
.post-header {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 4rem 2rem 2rem;
}

.post-header h1 {
    font-family: var(--font-body);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.post-meta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 1.5rem;
}

.post-meta .author {
    color: var(--text-secondary);
}

.post-meta .date {
    color: var(--ghidra-orange);
}

/* ========== POST CONTENT ========== */
.post-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2rem 2rem 6rem;
}

.post-content h2 {
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
    color: var(--text-primary);
    border-left: 3px solid var(--ghidra-orange);
    padding-left: 0.75rem;
}

.post-content h3 {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    color: var(--text-primary);
}

.post-content p {
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    line-height: 1.8;
}

.post-content ul, .post-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
    color: var(--text-primary);
}

.post-content li {
    margin-bottom: 0.4rem;
    line-height: 1.7;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

.post-content blockquote {
    border-left: 3px solid var(--ghidra-yellow);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-style: italic;
}

/* ========== CODE BLOCKS (Ghidra-style) ========== */
.post-content code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--bg-code);
    color: var(--ghidra-yellow);
    padding: 0.15em 0.4em;
    border-radius: 3px;
}

.post-content pre {
    background: var(--bg-code);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    position: relative;
}

.post-content pre::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(
        180deg,
        var(--ghidra-red) 0%,
        var(--ghidra-orange) 50%,
        var(--ghidra-yellow) 100%
    );
}

.post-content pre code {
    background: none;
    padding: 0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-primary);
}

/* ========== ARCHIVE PAGE ========== */
.archive-header {
    max-width: var(--header-width);
    margin: 0 auto;
    padding: 4rem 3rem 2rem;
}

.archive-header h1 {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.archive-header h1 span {
    color: var(--ghidra-orange);
}

/* ========== FOOTER ========== */
.site-footer {
    max-width: var(--header-width);
    margin: 0 auto;
    padding: 3rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-right {
    display: flex;
    gap: 1.5rem;
}

.footer-right a {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-right a:hover {
    color: var(--ghidra-orange);
}

/* ========== HEX DECORATION ========== */
.hex-decoration {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    opacity: 0.3;
    user-select: none;
    letter-spacing: 0.15em;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .site-header {
        padding: 1.5rem;
    }

    .hero {
        padding: 4rem 1.5rem 3rem;
    }

    .tagline {
        font-size: clamp(2.5rem, 10vw, 4rem);
        padding-left: 0;
    }

    .post-list-container {
        padding: 0 1.5rem 3rem;
    }

    .post-list-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
        padding: 1rem 0;
    }

    .post-categories {
        display: none;
    }

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

    .site-footer {
        padding: 2rem 1.5rem;
        flex-direction: column;
        gap: 1rem;
    }
}
