/* --- CSS VARIABLES & RESET --- */
:root {
    --bg-color: #0d0d0d;
    --term-green: #00ff41;
    --term-dim: #008f11;
    --text-color: #e0e0e0;
    --card-bg: #1a1a1a;
    --accent: #ff0055;
    --font-mono: 'Courier New', Courier, monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-mono);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

/* --- LAYOUT UTILITIES --- */
.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* --- HERO SECTION --- */
header {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    border-bottom: 1px solid var(--term-dim);
    padding: 2rem 0;
}

.glitch-wrapper {
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    font-weight: bold;
    color: var(--term-green);
    margin-bottom: 1rem;
    position: relative;
    line-height: 1.2;
    word-break: break-word;
}

/* Cursor Animation */
.cursor {
    display: inline-block;
    width: clamp(5px, 2vw, 10px);
    height: 1em;
    background-color: var(--term-green);
    animation: blink 1s infinite;
    vertical-align: bottom;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-text {
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 600px;
    color: #a0a0a0;
    margin-bottom: 2.5rem;
}

.cta-button {
    border: 1px solid var(--term-green);
    color: var(--term-green);
    padding: 1rem 2.5rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
}

.cta-button:hover {
    background-color: var(--term-green);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--term-green);
    cursor: pointer;
}

/* --- CONTENT SECTION --- */
.content-section {
    padding: 4rem 0;
}

h2 {
    color: var(--term-green);
    margin-bottom: 1.5rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* --- SOCIAL GRID (Fully Responsive) --- */
.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-card {
    background: var(--card-bg);
    padding: 2rem;
    border: 1px solid #333;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.social-card:hover {
    border-color: var(--term-green);
    transform: translateY(-5px);
}

.social-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 1.2rem;
}

.social-card span {
    font-size: 0.9rem;
    color: #666;
    word-break: break-all;
}

/* --- SOCIAL ICONS STYLING --- */
.social-icon {
    /* Changed from 32px to 16px (50% smaller) */
    width: 16px;
    height: 16px;
    fill: var(--term-green);
    margin-bottom: 0.8rem;
    transition: 0.3s;
}

/* Optional: Slight glow on hover */
.social-card:hover .social-icon {
    filter: drop-shadow(0 0 5px var(--term-green));
    transform: scale(1.1);
}

/* --- BLOG LISTING STYLES --- */
.blog-header {
    padding: 2rem 0;
    border-bottom: 1px solid #333;
    margin-bottom: 3rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--term-green);
}

.blog-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.blog-card {
    background: var(--card-bg);
    border: 1px solid #333;
    padding: 2rem;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.blog-card:hover {
    border-color: var(--term-green);
    transform: translateX(5px);
}

/* A decorative bar on the left of cards */
.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--term-dim);
    transition: 0.3s;
}

.blog-card:hover::before {
    background: var(--term-green);
    box-shadow: 0 0 10px var(--term-green);
}

.blog-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
}

.blog-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.blog-excerpt {
    color: #aaa;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Tags (e.g. [Ransomware]) */
.tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: #222;
    border: 1px solid #444;
    font-size: 0.75rem;
    margin-right: 0.5rem;
    color: var(--term-green);
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent);
    font-weight: bold;
    font-size: 0.9rem;
}

.read-more:hover {
    text-decoration: underline;
    color: #ff4d88;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 3rem 1rem;
    font-size: 0.8rem;
    color: #555;
    border-top: 1px solid #222;
}

/* --- MOBILE SPECIFIC OVERRIDES --- */
@media (max-width: 768px) {
    .container {
        padding: 1.2rem;
    }

    header {
        align-items: flex-start;
        text-align: left;
    }
    
    .cta-button {
        width: 100%;
        text-align: center;
    }

    .content-section {
        padding: 2.5rem 0;
    }
}

/* =========================================
   BLOG POST CONTENT STYLES (Markdown)
   ========================================= */

/* The Wrapper */
.article-content {
    font-family: sans-serif; /* Better readability for long text */
    font-size: 1.1rem;
    color: #cecece;
    line-height: 1.8;
    max-width: 100%;
    overflow-wrap: break-word;
}

/* Headers */
.article-content h1, 
.article-content h2, 
.article-content h3, 
.article-content h4 {
    color: var(--term-green);
    font-family: var(--font-mono);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
}

.article-content h1 { font-size: 2.2rem; border-bottom: 2px solid var(--term-green); }
.article-content h2 { font-size: 1.8rem; }
.article-content h3 { font-size: 1.4rem; color: #fff; }

/* Paragraphs & Lists */
.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul, 
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

/* Code Blocks (The most important part!) */
.article-content pre {
    background: #0a0a0a;
    border: 1px solid #333;
    border-left: 4px solid var(--term-green);
    padding: 1.5rem;
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 4px;
}

.article-content code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: #e0e0e0; /* Default text color inside code */
}

/* Inline Code (e.g. `variable`) */
.article-content p code, 
.article-content li code {
    background: #222;
    color: #ff9d00; /* Orange for emphasis */
    padding: 2px 6px;
    border-radius: 4px;
}

/* Images */
.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
    border: 1px solid #444;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* Blockquotes */
.article-content blockquote {
    border-left: 4px solid var(--accent);
    background: #1a1a1a;
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    color: #999;
    font-style: italic;
}

/* Links inside posts */
.article-content a {
    color: var(--term-green);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.article-content a:hover {
    color: var(--accent);
    background: rgba(255, 0, 85, 0.1);
}

/* --- MARKDOWN TABLE STYLES --- */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: #151515;
}

.article-content th, 
.article-content td {
    border: 1px solid #333;
    padding: 1rem;
    text-align: left;
}

.article-content th {
    background-color: #222;
    color: var(--term-green);
    text-transform: uppercase;
    font-size: 0.85rem;
}

.article-content tr:hover {
    background-color: #1f1f1f;
}