/* Matrix Theme - CLI/Terminal Aesthetic */
/* Override base colors and styling for dark matrix theme */

/* Base colors */
:root {
    --matrix-green: #00ff41;
    --matrix-dark-green: #008f11;
    --matrix-light-green: #39ff14;
    --matrix-bg-dark: #0d0208;
    --matrix-bg-medium: #1a0e13;
    --matrix-text-dim: #00cc33;
    --matrix-white-green: #a3ffaa;    
    --matrix-border: #003d0f;
}

/* Override body background with cmatrix image */
html {
    background: var(--matrix-bg-dark) center top no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

body {
    max-width: 85vw;       /* 90% of viewport width */ 
    margin: 0 auto;        /* center horizontally */
    position: relative;
}

body > div {
    background: rgba(13, 2, 8, 0.95);
    border-bottom: 1px solid var(--matrix-border);
}

body > div > div {
    background: rgba(26, 14, 19, 0.9);
    border-right: 1px solid var(--matrix-border);
}

/* Base text styling */
body {
    color: var(--matrix-green);
    font-family: 'Courier New', 'Liberation Mono', monospace;
    background: rgba(13, 2, 8, 0.8);
}

/* Headers */
h1, h2, h3, h4, h5, h6 {
    color: var(--matrix-light-green);
    font-family: 'Courier New', 'Liberation Mono', monospace;
}

/* Links */
a {
    color: var(--matrix-green);
    text-decoration: none;
    border-bottom: 1px dotted var(--matrix-dark-green);
    transition: all 0.3s ease;
}

a:visited {
    color: var(--matrix-text-dim);
}

a:hover, a:focus {
    color: var(--matrix-light-green);
    text-shadow: 0 0 8px var(--matrix-green);
    border-bottom-color: var(--matrix-green);
}

/* Header section */
body > header {
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 2px solid var(--matrix-green);
    box-shadow: 0 2px 10px rgba(0, 255, 65, 0.3);
}

body > header h1 a {
    color: var(--matrix-light-green);
    text-shadow: 0 0 15px var(--matrix-green);
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

body > header h2 {
    color: var(--matrix-text-dim);
    text-shadow: 0 0 5px var(--matrix-green);
}

/* Navigation */
body > nav {
    background: rgba(0, 0, 0, 0.8);
    border-top: 1px solid var(--matrix-green);
    border-bottom: 1px solid var(--matrix-green);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

body > nav a {
    color: var(--matrix-green);
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
    font-family: 'Courier New', monospace;
    border: none;
}

body > nav a:hover {
    color: var(--matrix-light-green);
    text-shadow: 0 0 10px var(--matrix-green);
}

body > nav li+li {
    border-left: 1px solid var(--matrix-border);
}

body > nav li+li a {
    border-left: 1px solid var(--matrix-dark-green);
}

/* Search box */
body > nav form .search {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--matrix-green);
    color: var(--matrix-green);
    font-family: 'Courier New', monospace;
}

body > nav form .search:focus {
    background-color: rgba(0, 20, 5, 0.9);
    border-color: var(--matrix-light-green);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    color: var(--matrix-light-green);
}

/* Article styling */
article {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--matrix-border);
    border-radius: 5px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.1);
}

article header {
    background: linear-gradient(to right,
        rgba(0, 255, 65, 0.1),
        rgba(0, 255, 65, 0.05),
        transparent
    );
    border-bottom: 1px solid var(--matrix-green);
}

article header h1 a {
    color: var(--matrix-light-green);
    text-shadow: 0 0 10px var(--matrix-green);
    font-weight: bold;
}

article header p.meta {
    color: var(--matrix-text-dim);
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
}

/* Code blocks */
pre, code {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--matrix-green);
    color: var(--matrix-green);
    font-family: 'Courier New', 'Liberation Mono', monospace;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.3);
}

.highlight {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--matrix-green);
    border-radius: 5px;
}

/* Inline code */
p code, p tt, li code, li tt {
    background: rgba(0, 20, 5, 0.8);
    border: 1px solid var(--matrix-dark-green);
    color: var(--matrix-light-green);
}

.toggle-sidebar {
    position: absolute;
    right: -10px;
    top: 0;
    bottom: 0;
    display: block;
    text-decoration: none;
    color: #cecece;
    width: 9px;

    /* Force background to black and remove borders */
    background-color: #000 !important;
    border: none;
}

/* Sidebar */
aside.sidebar {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--matrix-border);
    border-radius: 5px;
    color: var(--matrix-green);
}

aside.sidebar section h1 {
    color: var(--matrix-light-green);
    border-bottom: 1px solid var(--matrix-green);
    text-shadow: 0 0 8px var(--matrix-green);
}

aside.sidebar li {
    border-bottom: 1px solid var(--matrix-border);
    box-shadow: none;
}

aside.sidebar a {
    color: var(--matrix-green);
    border: none;
}

aside.sidebar:hover a {
    color: var(--matrix-light-green);
}

/* Footer */
body > footer {
    background: rgba(0, 0, 0, 0.9);
    color: var(--matrix-text-dim);
    border-top: 1px solid var(--matrix-green);
    box-shadow: 0 -2px 10px rgba(0, 255, 65, 0.2);
}

body > footer a {
    color: var(--matrix-green);
    border: none;
}

body > footer a:hover {
    color: var(--matrix-light-green);
}

/* Blockquotes */
blockquote {
    border-left: 4px solid var(--matrix-green);
    background: rgba(0, 20, 5, 0.3);
    color: var(--matrix-text-dim);
    font-style: italic;
}

/* Tables */
.entry-content table th,
.entry-content table td {
    border: 1px solid var(--matrix-border);
    background: rgba(0, 0, 0, 0.5);
}

.entry-content table th {
    background: rgba(0, 255, 65, 0.1);
    color: var(--matrix-light-green);
    font-weight: bold;
}

/* Pagination */
#content div.pagination {
    background: linear-gradient(to right,
        transparent,
        rgba(0, 255, 65, 0.1),
        transparent
    );
    border-top: 1px solid var(--matrix-green);
}

#content div.pagination a {
    color: var(--matrix-green);
    border: none;
}

#content div.pagination a:hover {
    color: var(--matrix-light-green);
    text-shadow: 0 0 8px var(--matrix-green);
}

/* Blog archives */
#blog-archives h1 {
    color: var(--matrix-light-green);
}

#blog-archives article {
    background: linear-gradient(to right,
        rgba(0, 255, 65, 0.05),
        transparent
    );
    border-bottom: 1px solid var(--matrix-border);
}

#blog-archives time,
#blog-archives a.category {
    color: var(--matrix-text-dim);
    font-family: 'Courier New', monospace;
}

/* Terminal-like prompt styling */
.terminal-prompt::before {
    color: var(--matrix-light-green);
    font-weight: bold;
}

/* Scrollbar styling for webkit browsers */
::-webkit-scrollbar {
    width: 12px;
    background: rgba(0, 0, 0, 0.9);
}

::-webkit-scrollbar-thumb {
    background: var(--matrix-green);
    border-radius: 6px;
    box-shadow: inset 0 0 5px rgba(0, 255, 65, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--matrix-light-green);
}

/* Selection styling */
::selection {
    background: rgba(0, 255, 65, 0.3);
    color: var(--matrix-light-green);
}

::-moz-selection {
    background: rgba(0, 255, 65, 0.3);
    color: var(--matrix-light-green);
}

/* Add some matrix-style animations */
@keyframes matrix-glow {
    0%, 100% {
        text-shadow: 0 0 5px var(--matrix-green);
    }
    50% {
        text-shadow: 0 0 15px var(--matrix-light-green), 0 0 25px var(--matrix-green);
    }
}

/* Apply glow animation to main title */
body > header h1 a {
    animation: matrix-glow 3s ease-in-out infinite;
}

/* CLI-style focus indicators */
input:focus, textarea:focus {
    outline: 2px solid var(--matrix-green);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

/* Paragraph text - whiteish green */
p {
    color: var(--matrix-white-green);
}

#matrix {
  position: fixed;   /* so it stays while scrolling */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;       /* push it behind your content */
  background: black; /* fallback */
}

.highlight code {
    font-family: Menlo, Monaco, "Andale Mono", "Lucida Console", "Courier New", monospace !important;
    font-size: 1.6em;  /* increase this to 1.2em as needed */
    line-height: 1.6em; /* optional: slightly more spacing for readability */
    overflow-x: auto;
    padding: 1em !important; /* more padding makes code easier to read */
    background: #263a40 url(../images/noise.png?1395516324) top left !important;
    border: none;
    display: block;
}

/* Force override Isso defaults */
.isso-postbox,
.isso-comment {
  background-color: #1e1e1e !important;
  color: #ffffff !important;
  border: 1px solid #444 !important;
}

.isso-textarea {
  background-color: #2c2c2c !important;
  color: #ffffff !important;
  border: 1px solid #555 !important;
}

.isso-postbox input[type="text"],
.isso-postbox input[type="email"],
.isso-postbox input[type="url"] {
  background-color: #2c2c2c !important;
  color: #ffffff !important;
}

a[rel="full-article"] {
    background: linear-gradient(145deg, #001a00, #003300);
    color: #ccffcc;
    border: 1px solid #00cc00;
    padding: 0.5em 1em;
    font-family: monospace;
    text-decoration: none;
    transition: 0.2s;
}

a[rel="full-article"]:hover {
    background: linear-gradient(145deg, #00cc00, #004400);
    color: #000;
}

.readtime {
  color: var(--matrix-green) !important;          /* same neon green you use elsewhere */
  font-family: monospace !important;             /* keeps with the hacker/CLI aesthetic */
  font-size: 0.9em !important;
  opacity: 0.85 !important;
  display: inline-block;
  margin-left: 0.5em !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
}

article ul {
  margin-left: 2em !important;   /* Indent the entire list */
  padding-left: 1em !important;  /* Space between bullet and text */
}

article ol {
  margin-left: 2em !important;   /* Indent the entire list */
  padding-left: 1em !important;  /* Space between bullet and text */
}

/* Style for the 'Last modified' line */
.last-modified {
  font-size: 0.7em;          /* smaller than body text */
  color: #66ff99;             /* subtle neon green to match theme */
  margin-bottom: 1.5rem;      /* space before article content */
  letter-spacing: 0.03em;
  position: relative;
  top: -1.2rem;   /* gentler than negative margin */
}

