/* --- 1. LOCAL FONT ACQUISITION (style.css) --- */
/* Press Start 2P */
@font-face {
    font-family: 'Press Start 2P';
    src: url('/fonts/PressStart2P-Regular.woff2') format('woff2'),
         url('/fonts/PressStart2P-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap; /* Keeps content visible while the font loads */
}

/* VT323 */
@font-face {
    font-family: 'VT323';
    src: url('/fonts/VT323-Regular.woff2') format('woff2'),
         url('/fonts/VT323-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-color: #050a14; /* Deep space blue */
    --panel-bg: #001525;
    --border-highlight: #00eaff; /* X-Buster Cyan */
    --border-shadow: #004a80;
    --text-main: #e0f8ff;
    --text-dim: #5c8ca0;
    --weapon-bar-bg: #333;
    --weapon-fill-start: #ffcc00;
    --weapon-fill-end: #ff6600;
    --font-header: 'Press Start 2P', cursive;
    --font-term: 'VT323', monospace;

    /* --- NEW HUGO/READABILITY VARIABLES (Added Here) --- */
    --line-height-term-base: 1.4; 
    --content-max-width: 800px; /* Note: Not currently used, but good to keep */
    --code-bg: #000;
    --code-text: #0f0; 
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 20px;
    background-color: var(--bg-color);
    font-family: var(--font-header);
    color: var(--text-main);
    overflow-x: hidden;
}

html {
    font-size: 20px;
}

/* Background Grid Effect (The "Simulation" feel) */
.grid-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(0, 234, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 234, 255, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    pointer-events: none;
}

.scanlines {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 999;
}

.container { max-width: 1100px; margin: 0 auto; }

/* SYSTEM BOXES (The Main Containers) */
.sys-box {
    background: var(--panel-bg);
    border: 4px solid var(--border-shadow);
    box-shadow: 0 0 0 2px var(--border-highlight); /* Double border effect */
    padding: 20px;
    margin-bottom: 30px;
    position: relative;
}

/* Corner Decorations */
.sys-box::after {
    content: '';
    position: absolute;
    bottom: -6px; right: -6px;
    width: 20px; height: 20px;
    background: var(--border-highlight);
    clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

.header-box { text-align: center; border-color: var(--border-highlight); }
h1 { color: var(--border-highlight); text-shadow: 2px 2px 0px #000; margin-bottom: 10px; }
.sys-status { font-family: var(--font-term); font-size: 1.2rem; color: var(--text-dim); }
.blink { animation: blinker 1.5s linear infinite; }

@keyframes blinker { 50% { opacity: 0; } }

.mmx-header {
    font-size: 1rem;
    background: linear-gradient(90deg, var(--border-shadow), transparent);
    padding: 5px 10px;
    margin-top: 0;
    color: #fff;
    border-left: 5px solid var(--border-highlight);
}

.sys-text { font-family: var(--font-term); font-size: 1.2rem; color: var(--text-dim); }

.main-grid {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 30px;
}

@media (max-width: 800px) { .main-grid { grid-template-columns: 1fr; } }

/* === WEAPON GRID (Left Column) === */
.weapon-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.weapon-card {
    display: grid;
    grid-template-columns: 60px 1fr; /* Icon | Data */
    gap: 15px;
    background: #000;
    border: 2px solid #333;
    padding: 10px;
    text-decoration: none;
    transition: 0.2s;
}

.weapon-card:hover {
    border-color: #fff;
    background: #111;
    transform: translateX(5px);
}

/* The Square Letter Icon */
.weapon-icon {
    width: 60px; height: 60px;
    background: var(--border-shadow);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border: 2px solid var(--text-dim);
}

.weapon-card:hover .weapon-icon {
    background: var(--border-highlight);
    color: #000;
}

.weapon-data h3 {
    font-size: 0.8rem; margin: 0 0 5px 0; color: var(--text-main);
}

/* The MMX Energy Bar */
.energy-bar-container {
    height: 12px;
    background: var(--weapon-bar-bg);
    margin-bottom: 5px;
    border: 1px solid #555;
    position: relative;
}

.energy-bar {
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        var(--weapon-fill-start),
        var(--weapon-fill-start) 4px,
        var(--weapon-fill-end) 4px,
        var(--weapon-fill-end) 8px
    );
    box-shadow: 0 0 5px var(--weapon-fill-start);
}

.weapon-desc {
    font-family: var(--font-term);
    font-size: 1.1rem;
    color: var(--text-dim);
    margin: 0;
    line-height: 1;
}

/* === LORE / BLOG (Right Column) === */
.lore-box { background: #000; border-color: #444; }

.terminal-feed {
    font-family: var(--font-term);
    font-size: 1.2rem;
    color: #0f0; /* Terminal Green fallback */
}

.lore-entry {
    border-left: 2px solid #333;
    padding-left: 10px;
    margin-bottom: 20px;
}

.lore-meta { font-size: 0.9rem; color: #555; margin-bottom: 2px; }
.lore-status { color: #d00; font-weight: bold; margin-left: 5px; }

.lore-title {
    display: block;
    color: var(--text-main);
    text-decoration: none;
    line-height: 1.1;
}
.lore-title:hover {
    background: var(--text-main);
    color: #000;
}

.sys-button {
    display: block;
    background: var(--border-shadow);
    color: #fff;
    text-align: center;
    padding: 10px;
    text-decoration: none;
    font-size: 0.7rem;
    border: 2px solid var(--border-highlight);
    margin-top: 20px;
}
.sys-button:hover { background: var(--border-highlight); color: #000; }

.footer-box { text-align: center; font-size: 0.6rem; color: #444; border: none; background: transparent; box-shadow: none; }

/* === PROFILE BOX === */
.profile-content {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.avatar-placeholder {
    background: #000;
    border: 2px solid var(--border-shadow);
    color: var(--border-highlight);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.6rem;
    overflow: hidden;
}

.bio-text {
    font-family: var(--font-term);
    font-size: 1.1rem;
    color: var(--text-main);
}

.bio-text p { margin: 0 0 10px 0; }

.action-buttons {
    display: flex;
    gap: 10px;
}

.small-btn {
    flex: 1;
    margin-top: 0; /* Reset margin from general button style */
    font-size: 0.6rem;
    padding: 8px;
}

/* Helper to stack the right column elements nicely */
.right-col {
    display: flex;
    flex-direction: column;
    gap: 0; /* The margin-bottom on .sys-box handles the spacing */
}

/* --- MAIN LAYOUT ADJUSTMENTS FOR HUGO --- */
.main-log-area {
    /* The main content area should also use the system box styling */
    background: var(--panel-bg);
    border: 4px solid var(--border-shadow);
    box-shadow: 0 0 0 2px var(--border-highlight);
    padding: 20px;
    margin-bottom: 30px;
    position: relative;
    /* Corner decoration here if needed, or rely on .sys-box */
}

/* Core Content Typography */
.main-log-area p, 
.main-log-area ul, 
.main-log-area ol {
    font-family: var(--font-term);
    font-size: 1.5rem; /* Slightly larger for easier reading */
    color: var(--text-main);
    line-height: var(--line-height-term-base); /* Key readability fix */
}

/* Headings within the post (H2, H3, H4) */
.main-log-area h2, 
.main-log-area h3 {
    font-family: var(--font-header);
    color: var(--border-highlight);
    margin-top: 30px;
    border-bottom: 2px dotted var(--border-shadow);
    padding-bottom: 5px;
}

/* Code Block Styling (Crucial for a developer blog) */
pre {
    background: var(--code-bg); /* Should be #000 */
    border: 1px solid var(--border-shadow); /* Subtle dark border */
    /* Add the high-contrast highlight border */
    border-left: 5px solid var(--border-highlight); 
    padding: 15px;
    overflow-x: auto; /* Ensures long lines don't break layout */
    
    font-family: var(--font-term);
    font-size: 1.5rem; /* Scaled up for readability */
    color: var(--code-text); /* Should be #0f0 (Terminal Green) */
    line-height: 1.3;
    
    /* Add a slight text shadow for that old CRT glow effect */
    text-shadow: 0 0 4px rgba(0, 255, 0, 0.4); 
}

/* Inline Code (e.g., `git status`) */
code {
    font-family: var(--font-term);
    /* Make inline code distinct but not disruptive */
    background-color: rgba(0, 234, 255, 0.1); 
    color: var(--border-highlight);
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 1em; /* Inherits parent size */
}

/* --- Table / Data Grid Styling --- */
table {
    width: 100%;
    /* Use the terminal font for all table data */
    font-family: var(--font-term);
    font-size: 1.3rem;
    border-collapse: collapse; /* Removes double borders */
    margin: 20px 0;
    color: var(--text-main);
}

/* Table Headers (The Labels) */
th {
    background-color: var(--border-shadow); /* Dark blue background */
    color: var(--border-highlight); /* Cyan text for headers */
    text-align: left;
    padding: 10px;
    border: 1px solid var(--border-highlight);
    text-transform: uppercase;
}

/* Table Data Cells */
td {
    padding: 10px;
    border: 1px solid var(--border-shadow);
    /* Alternative row coloring for scanline/readability effect */
}

/* Zebra Striping (Optional: enhances readability for data logs) */
tr:nth-child(even) {
    background-color: var(--panel-bg); /* Slightly lighter dark panel */
}

/* Ensure links/text inside tables use the right color */
table a {
    color: var(--border-highlight);
    text-decoration: none;
}
table a:hover {
    color: var(--text-main);
    text-decoration: underline;
}