:root {
    /* -- Palette -- */
    --bg-void: #050510;
    --bg-panel: #0a0a14;
    --text-main: #e0e0e0;
    --text-dim: #8888aa;

    /* -- Neon Accents -- */
    --neon-cyan: #00f3ff;
    --neon-pink: #ff00ff;
    --neon-amber: #ffb86c;
    --neon-green: #50fa7b;

    /* -- UI Elements -- */
    --border-color: #333344;
    --border-bright: var(--neon-cyan);
    --crt-scanline: rgba(18, 16, 16, 0.1);
    --glow-strength: 0px 0px 8px;
    /* Default glow */

    /* -- Typography -- */
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* Base Reset & Setup */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    /* Subtle CRT curvature vignette could go here, but let's keep it simple first */
    background: radial-gradient(circle at center, #11111b 0%, var(--bg-void) 100%);
}

body {
    background-color: transparent;
    color: var(--text-main);
    font-family: var(--font-mono);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* --- CRT Overlay Effects --- */

/* Scanlines */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(to bottom,
            rgba(18, 16, 16, 0) 50%,
            rgba(0, 0, 0, 0.25) 50%);
    background-size: 100% 4px;
    z-index: 999;
    pointer-events: none;
    animation: scanline 10s linear infinite;
}

/* Subtle Flicker */
body::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(18, 16, 16, 0.1);
    opacity: 0;
    z-index: 999;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

@keyframes scanline {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 100%;
    }
}

@keyframes flicker {
    0% {
        opacity: 0.02;
    }

    50% {
        opacity: 0.05;
    }

    100% {
        opacity: 0.02;
    }
}

/* --- Typography --- */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    color: var(--neon-pink);
    text-shadow: 0 0 5px rgba(255, 0, 255, 0.5);
}

h1 {
    font-size: 2.5rem;
    border-bottom: 2px solid var(--neon-cyan);
    padding-bottom: 0.5rem;
    display: inline-block;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.6);
}

a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: all 0.2s ease;
    text-shadow: 0 0 2px rgba(0, 243, 255, 0.4);
}

a:hover {
    color: #fff;
    text-shadow: 0 0 8px var(--neon-cyan);
    background: rgba(0, 243, 255, 0.1);
}

p {
    margin-bottom: 1.5rem;
    max-width: 65ch;
}

/* --- Layout Components --- */

/* Header */
header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    background: rgba(5, 5, 16, 0.8);
    backdrop-filter: blur(4px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.header-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--neon-green);
    text-shadow: 0 0 5px rgba(80, 250, 123, 0.5);
    border: 1px solid var(--neon-green);
    padding: 0.2rem 0.6rem;
}

.logo a:hover {
    background: var(--neon-green);
    color: var(--bg-void);
    text-shadow: none;
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

nav a {
    color: var(--text-dim);
    font-size: 0.9rem;
    text-transform: uppercase;
    text-shadow: none;
}

nav a:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan);
    background: none;
}

nav a::before {
    content: "[";
    margin-right: 5px;
    color: var(--border-color);
    transition: color 0.2s;
}

nav a::after {
    content: "]";
    margin-left: 5px;
    color: var(--border-color);
    transition: color 0.2s;
}

nav a:hover::before,
nav a:hover::after {
    color: var(--neon-cyan);
}


/* Main Container */
main {
    flex: 1;
    max-width: 900px;
    margin: 2rem auto;
    width: 100%;
    padding: 2rem;
    border: 1px solid var(--border-color);
    background: rgba(10, 10, 20, 0.6);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* Decorative "Terminal" Corners */
main::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--neon-pink);
    border-left: 2px solid var(--neon-pink);
}

main::after {
    content: "";
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--neon-pink);
    border-right: 2px solid var(--neon-pink);
}

/* --- Hero Section --- */
.hero {
    text-align: left;
    padding: 3rem 0;
    border-bottom: 1px dashed var(--border-color);
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    border: none;
    padding: 0;
    color: var(--neon-pink);
    text-shadow: 2px 2px 0px var(--neon-cyan);
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--neon-cyan);
    margin-bottom: 1rem;
}

.hero .description {
    font-family: sans-serif;
    /* Contrast font? Or keep mono? Let's keep mono for now */
    color: var(--text-dim);
}


/* --- Cards (Projects/Posts) --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    border: 1px solid var(--border-color);
    background: var(--bg-panel);
    padding: 1.5rem;
    position: relative;
    transition: transform 0.2s, border-color 0.2s;
}

.project-card:hover {
    border-color: var(--neon-cyan);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.15);
}

.project-card h3 {
    margin-top: 0;
    color: var(--neon-cyan);
    font-size: 1.2rem;
    text-shadow: none;
}

.project-card h3 a {
    color: inherit;
    text-shadow: inherit;
}

.project-card .description {
    color: var(--text-dim);
    font-size: 0.9rem;
}


/* --- Lists --- */
.post-list {
    list-style: none;
}

.post-list li {
    padding: 1rem 0;
    border-bottom: 1px dashed var(--border-color);
    display: flex;
    flex-direction: column;
}

.post-list li:hover {
    background: rgba(255, 255, 255, 0.02);
}

.post-list h3 {
    font-size: 1.3rem;
    margin: 0 0 0.5rem 0;
    text-shadow: none;
}

.post-list .date {
    font-size: 0.8rem;
    color: var(--neon-amber);
    font-family: var(--font-mono);
    text-transform: uppercase;
}

main ol,
main ul {
    padding: 0 2em;
    margin-bottom: 1.5rem;
}

/* --- Code Blocks --- */
pre {
    background: #000;
    border: 1px solid var(--border-color);
    padding: 1rem;
    overflow-x: auto;
    color: var(--neon-green);
    margin-bottom: 1.5rem;
}

code {
    font-family: var(--font-mono);
    color: var(--neon-pink);
}

pre code {
    color: inherit;
}

/* --- Footer --- */
footer {
    margin-top: auto;
    padding: 1rem 0;
    border-top: 2px solid var(--border-color);
    text-align: center;
    background: var(--bg-panel);
}

.footer-container {
    color: var(--text-dim);
}

.footer-links a {
    margin: 0 0.5rem;
}

.social-links {
    padding: 1rem 0;
}

.footer-links {
    padding: 1rem 0;
}

.footer-shop {
    padding: 1rem 0;
}

.footer-copy {
    display: flex;
    justify-content: center;
}

.footer-copy p{
    margin-bottom: 0;
}

/* Social Icons */
.social-links svg {
    fill: var(--text-dim);
    transition: fill 0.2s, filter 0.2s;
}

.social-links a:hover svg {
    fill: var(--neon-cyan);
    filter: drop-shadow(0 0 5px var(--neon-cyan));
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    main {
        padding: 1rem;
        width: 95%;
    }

    nav ul {
        gap: 1rem;
        font-size: 0.8rem;
    }
}
